fix(release): add github-custom-runners for retired CI runners #8
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 Snap | |
| on: | |
| push: | |
| tags: | |
| - '*-?[0-9]+.[0-9]+.[0-9]+*' | |
| workflow_dispatch: | |
| inputs: | |
| channel: | |
| description: 'Snap Store channel (stable/candidate/beta/edge)' | |
| required: false | |
| default: 'stable' | |
| jobs: | |
| snap: | |
| name: Build and publish Snap package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Update version in snapcraft.yaml | |
| run: | | |
| # Extract version from tag: dk-v0.6.0 → 0.6.0 | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#dk-v}" | |
| VERSION="${VERSION#v}" | |
| sed -i "s/^version: .*/version: \"${VERSION}\"/" snap/snapcraft.yaml | |
| echo "Building snap version: ${VERSION}" | |
| - name: Build snap | |
| id: build | |
| uses: snapcore/action-build@v1 | |
| - name: Publish to Snap Store | |
| uses: snapcore/action-publish@v1 | |
| env: | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
| with: | |
| snap: ${{ steps.build.outputs.snap }} | |
| release: ${{ github.event.inputs.channel || 'stable' }} |