chore(project): bump version to 2.9.0 #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| - 'V*' | |
| - '[0-9]*' | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| jobs: | |
| prepare-release-notes: | |
| name: Prepare release notes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| current_tag: ${{ steps.release.outputs.current_tag }} | |
| previous_tag: ${{ steps.release.outputs.previous_tag }} | |
| version: ${{ steps.release.outputs.version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Resolve release metadata | |
| id: release | |
| shell: bash | |
| run: | | |
| tag_name="${GITHUB_REF#refs/tags/}" | |
| clean_version="${tag_name#[vV]}" | |
| previous_tag="" | |
| if git rev-parse "${GITHUB_SHA}^" >/dev/null 2>&1; then | |
| previous_tag="$(git describe --tags --abbrev=0 "${GITHUB_SHA}^" 2>/dev/null || true)" | |
| fi | |
| echo "current_tag=$tag_name" >> "$GITHUB_OUTPUT" | |
| echo "previous_tag=$previous_tag" >> "$GITHUB_OUTPUT" | |
| echo "version=$clean_version" >> "$GITHUB_OUTPUT" | |
| - name: Generate release notes | |
| shell: pwsh | |
| run: | | |
| $sharedParams = @{ | |
| RepositoryPath = (Get-Location).Path | |
| CurrentTag = '${{ steps.release.outputs.current_tag }}' | |
| RepoUrl = 'https://github.com/${{ github.repository }}' | |
| } | |
| if (-not [string]::IsNullOrWhiteSpace('${{ steps.release.outputs.previous_tag }}')) { | |
| $sharedParams.PreviousTag = '${{ steps.release.outputs.previous_tag }}' | |
| } | |
| ./scripts/generate-release-notes.ps1 @sharedParams -OutputPath 'release-notes.md' | |
| ./scripts/generate-release-notes.ps1 @sharedParams -OutputPath 'release-notes-velopack.md' -OutputMode Velopack | |
| - name: Upload release notes artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-notes | |
| path: | | |
| release-notes.md | |
| release-notes-velopack.md | |
| if-no-files-found: error | |
| build-packages: | |
| name: Build for ${{ matrix.os }} | |
| needs: prepare-release-notes | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| rid: win-x64 | |
| main_exe: EasyExtractCrossPlatform.exe | |
| - os: ubuntu-latest | |
| rid: linux-x64 | |
| main_exe: EasyExtractCrossPlatform | |
| - os: macos-latest | |
| rid: osx-arm64 | |
| main_exe: EasyExtractCrossPlatform | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Download release notes | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: release-notes | |
| path: . | |
| - name: Setup .NET 9 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Install Velopack (vpk) | |
| run: dotnet tool install -g vpk | |
| - name: Install Dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libfuse2 | |
| - name: Publish DotNet | |
| run: | | |
| dotnet publish EasyExtractUnitypackageRework/EasyExtractCrossPlatform/EasyExtractCrossPlatform.csproj \ | |
| -c Release \ | |
| -r ${{ matrix.rid }} \ | |
| --self-contained \ | |
| -p:Version=${{ needs.prepare-release-notes.outputs.version }} \ | |
| -o publish_output | |
| - name: Pack with Velopack | |
| run: | | |
| vpk pack \ | |
| -u EasyExtractCrossPlatform \ | |
| -v ${{ needs.prepare-release-notes.outputs.version }} \ | |
| -p publish_output \ | |
| -o release_output \ | |
| --mainExe ${{ matrix.main_exe }} \ | |
| --releaseNotes release-notes-velopack.md | |
| - name: Upload packaged assets | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: release-assets-${{ matrix.rid }} | |
| path: release_output/* | |
| if-no-files-found: error | |
| draft-release: | |
| name: Draft GitHub release | |
| needs: | |
| - prepare-release-notes | |
| - build-packages | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download release notes | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: release-notes | |
| path: . | |
| - name: Download packaged assets | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: release-assets-* | |
| path: release_output | |
| merge-multiple: true | |
| - name: Create draft release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ needs.prepare-release-notes.outputs.current_tag }} | |
| tag_name: ${{ needs.prepare-release-notes.outputs.current_tag }} | |
| body_path: release-notes.md | |
| files: release_output/* | |
| draft: true | |
| generate_release_notes: false | |
| overwrite_files: true | |
| fail_on_unmatched_files: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |