release test 2 #3
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 Stable Release | |
| on: | |
| push: | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish: | |
| name: Build & Publish Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| global-json-file: global.json | |
| - name: Setup Taskfile | |
| uses: arduino/setup-task@v2 | |
| - name: Create .env file with secrets | |
| run: | | |
| cp public.env .env | |
| echo "NUGET_API_KEY=${{ secrets.NUGET_API_KEY }}" >> .env | |
| - name: Get stable version from tag | |
| id: version | |
| run: echo "version=$(task get-version)" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Release ${{ github.ref_name }} | |
| body: "Stable release for version ${{ steps.version.outputs.version }}." | |
| - name: Run Tests | |
| run: task test | |
| - name: Execute Smart Release | |
| env: | |
| # The GITHUB_TOKEN is needed for the `gh` command inside the release task | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Call the single, top-level release task and pass in the | |
| # CI-specific variables it needs. | |
| task release APP_VERSION=${{ steps.version.outputs.version }} GITHUB_REF_NAME=${{ github.ref_name }} |