jpm-canonical is building a snap #10
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: Build snap package | |
run-name: ${{ github.actor }} is building a snap | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allow manual trigger | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Branch name | |
env: | |
PR_NR: ${{ github.event.pull_request.number }} | |
EV_NR: ${{ github.event.number }} | |
run: | | |
echo "GITHUB_REF=${GITHUB_REF}" | |
echo "GITHUB_HEAD_REF=${GITHUB_HEAD_REF}" | |
echo "PR_NR=${PR_NR}" | |
echo "EV_NR=${EV_NR}" | |
echo "${{ toJson(github) }}" | |
- name: Build snap | |
uses: snapcore/action-build@v1 | |
id: snapcraft | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: go-hello-world.snap | |
path: ${{ steps.snapcraft.outputs.snap }} | |
if-no-files-found: error |