style: fix RELEASING (#45) #78
This file contains 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: Snapcraft Build | |
on: | |
workflow_dispatch: | |
# Ensure the build works on main | |
push: | |
branches: [main] | |
# Ensure the build works on each pull request | |
pull_request: | |
# Build and publish on release | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v1 | |
- name: Load dotenv | |
run: just bump-version | |
- name: Build snap package | |
uses: snapcore/action-build@v1 | |
with: | |
path: public/packaging | |
id: snapcraft | |
# Push, on each release, to the stable channel | |
- uses: snapcore/action-publish@v1 | |
if: ${{ env.GITHUB_EVENT_NAME == 'release' }} | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} | |
with: | |
snap: ${{ steps.snapcraft.outputs.snap }} | |
release: stable |