chore(deps): update actions/checkout action to v7 (#10) #26
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: Release | |
| on: | |
| push: | |
| branches: [master] | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Build & Publish (self-contained single-file) | |
| run: dotnet publish windows/QuadClicker.csproj -c Release -r win-x64 | |
| --self-contained true | |
| -p:PublishSingleFile=true | |
| -p:IncludeNativeLibrariesForSelfExtract=true | |
| -p:EnableCompressionInSingleFile=true | |
| -o artifacts/windows | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: QuadClicker-win-x64 | |
| path: artifacts/windows/ | |
| release: | |
| needs: [build-windows] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate version tag | |
| id: version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | |
| echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" | |
| echo "is_manual_tag=true" >> "$GITHUB_OUTPUT" | |
| else | |
| TAG="v0.0.0-dev.$(date +%Y%m%d).${GITHUB_SHA::7}" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "is_manual_tag=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Download Windows artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: QuadClicker-win-x64 | |
| path: release/windows | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| files: | | |
| release/windows/QuadClicker.exe | |
| generate_release_notes: true | |
| prerelease: ${{ steps.version.outputs.is_manual_tag == 'false' }} | |
| make_latest: ${{ steps.version.outputs.is_manual_tag == 'true' }} |