diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72c029985b..342facf373 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest outputs: release_upload_url: ${{ steps.create_release.outputs.upload_url }} + package_version: ${{ steps.create_tags.outputs.release_name }} steps: - name: Checkout repo uses: actions/checkout@v2 @@ -33,6 +34,8 @@ jobs: exit 1 ;; esac + + echo "::set-output name=package_version::$RELEASE_NAME" env: RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }} @@ -229,16 +232,12 @@ jobs: needs: - setup - cli + env: + PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }} steps: - name: Checkout repo uses: actions/checkout@v2 - - name: Set PACKAGE_VERSION - shell: pwsh - run: | - $env:pkgVersion = (Get-Content -Raw -Path ./package.json | ConvertFrom-Json).version - echo "PACKAGE_VERSION=$env:pkgVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Install Snapcraft uses: samuelmeuli/action-snapcraft@v1 @@ -253,11 +252,20 @@ jobs: GITHUB_REF: ${{ github.ref }} GITHUB_EVENT: ${{ github.event_name }} - - name: Get bw linux cli - uses: actions/download-artifact@v2 + - name: Get snap release asset + uses: dsaltares/fetch-gh-release-asset@0.0.5 with: + version: tags/${{ env.TAG_VERSION }} name: bw-linux-${{ env.PACKAGE_VERSION }}.zip - path: ./dist/snap + env: + TAG_VERSION: ${{ needs.setup.outputs.tag_version }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: move assets + run: | + echo "Hopefully this is temporary until release 0.0.6 of the fetch-gh-release-asset is released" + mkdir dist + mv bw_${{ env.PACKAGE_VERSION }}_amd64.snap -t dist - name: Build Snap Package run: |