Provide a pre-constructed release URL with version requests #12
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: CI | |
| on: | |
| workflow_dispatch: | |
| inputs: {} | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '.github/**' | |
| - 'docs/**' | |
| - 'assets/**' | |
| - '.vscode/**' | |
| - '*.yml' | |
| - '*.json' | |
| - '*.md' | |
| - '.gitignore' | |
| - '.gitattributes' | |
| env: | |
| BASE_VERSION: "1.0" | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Get version info | |
| id: version_info | |
| run: | | |
| echo "build_version=${{ env.BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT | |
| echo "prev_build_version=${{ env.BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - uses: actions/checkout@v4 | |
| name: "Checkout code" | |
| - uses: actions/setup-dotnet@v4 | |
| name: "Install .NET SDK" | |
| with: | |
| global-json-file: global.json | |
| - name: Compile | |
| run: bash build.sh ${{ steps.version_info.outputs.build_version }} false | |
| - name: Create release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: "Ryubing UpdateServer V${{ steps.version_info.outputs.build_version }}" | |
| tag: ${{ steps.version_info.outputs.build_version }} | |
| artifacts: "artifacts/*" | |
| body: "**[Changes since last build](https://github.com/Ryubing/UpdateServer/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }})**" | |
| omitBodyDuringUpdate: true | |
| owner: Ryubing | |
| repo: UpdateServer | |
| token: ${{ secrets.RELEASE_TOKEN }} |