From dce079222af432286687604aad87db36052cb706 Mon Sep 17 00:00:00 2001 From: Taso Date: Thu, 5 Aug 2021 20:24:38 -0400 Subject: [PATCH] ci(tagged-release): no longer tag releases with v* makes this easier for semver tracking and consistency sake --- .github/workflows/tagged-releases.yml | 44 +++++++++++++++++++-------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/.github/workflows/tagged-releases.yml b/.github/workflows/tagged-releases.yml index 543b54d..5273f5c 100644 --- a/.github/workflows/tagged-releases.yml +++ b/.github/workflows/tagged-releases.yml @@ -2,14 +2,36 @@ name: Tagged Release Publisher on: push: tags: - - "v*" + - "*" jobs: - create-tagged-release: + bump-version: + name: Bump Version + runs-on: ubuntu-latest + outputs: + VERSION_TAG: ${{ steps.get_version_tag.outputs.VERSION_TAG }} + steps: + - name: Checkout source code + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + + - name: Get Version Tag + id: get_version_tag + run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: 14.x + - name: Bump package shells + run: | + cd phone && npm version ${{ needs.bump-version.outputs.VERSION_TAG }} + + create-tagged-release: name: Build and Create Tagged Release runs-on: ubuntu-latest + needs: bump-version - outputs: - VERSION_TAG: ${{ steps.get_vars.outputs.VERSION_TAG }} steps: - name: Install archive tools run: sudo apt install zip @@ -20,10 +42,6 @@ jobs: fetch-depth: 0 ref: ${{ github.ref }} - - name: Get variables - run: echo ::set-output name=VERSION_TAG::${GITHUB_REF/refs\/tags\//} - id: get_vars - - name: Install dependencies run: yarn @@ -39,10 +57,9 @@ jobs: SENTRY_URL: https://sentry.projecterror.dev/ with: environment: production - tagName: ${{ steps.get_vars.outputs.VERSION_TAG }} + tagName: ${{ needs.bump-version.outputs.VERSION_TAG }} sourceMapOptions: './resources/html/static/js' - - name: Create Sentry Release (NodeJS) uses: tclindner/sentry-releases-action@v1.2.0 env: @@ -60,16 +77,17 @@ jobs: mkdir -p ./temp/npwd/resources cp ./{LICENSE,README.md,config.json,import.sql,fxmanifest.lua} ./temp/npwd/ cp -r ./resources/{dist,html} ./temp/npwd/resources - cd ./temp && zip -r npwd-${{ steps.get_vars.outputs.VERSION_TAG }}.zip ./npwd + cd ./temp && zip -r npwd-${{ needs.bump-version.outputs.VERSION_TAG }}.zip ./npwd - name: Create Release uses: "marvinpinto/action-automatic-releases@v1.2.1" id: auto_release with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - title: NPWD Release | ${{ steps.get_vars.outputs.VERSION_TAG }} + title: NPWD Release | ${{ needs.bump-version.outputs.VERSION_TAG }} prerelease: false - files: npwd-${{ steps.get_vars.outputs.VERSION_TAG }}.zip + files: npwd-${{ needs.bump-version.outputs.VERSION_TAG }}.zip env: + CI: false GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file