diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b392032..9c3894a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,8 +10,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -28,7 +26,7 @@ jobs: uses: thedoctor0/zip-release@master with: type: 'zip' - filename: Real-CUGAN-GUI-${{ env.RELEASE_VERSION }}-windows.zip + filename: Real-CUGAN-GUI-${{ github.ref_name }}-windows.zip directory: build/windows/runner/Release - name: Windows Release uses: softprops/action-gh-release@v1 @@ -36,14 +34,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - files: build/windows/runner/Release/Real-CUGAN-GUI-${{ env.RELEASE_VERSION }}-windows.zip + files: build/windows/runner/Release/Real-CUGAN-GUI-${{ github.ref_name }}-windows.zip build-and-release-macos: runs-on: macos-latest steps: - uses: actions/checkout@v3 - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -60,12 +56,12 @@ jobs: uses: thedoctor0/zip-release@master with: type: 'zip' - filename: Real-CUGAN-GUI-${{ env.RELEASE_VERSION }}-macos.zip + filename: Real-CUGAN-GUI-${{ github.ref_name }}-macos.zip directory: build/macos/Runner/Release - name: macOS Release uses: softprops/action-gh-release@v1 - if: startsWith(env.RELEASE_VERSION, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - files: build/windows/runner/Release/Real-CUGAN-GUI-${{ env.RELEASE_VERSION }}-macos.zip \ No newline at end of file + files: build/windows/runner/Release/Real-CUGAN-GUI-${{ github.ref_name }}-macos.zip \ No newline at end of file