version 0.2.12 (#43) #33
Workflow file for this run
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: snap | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- build-for: 'amd64' | |
- build-for: 'arm64' | |
- build-for: 'armhf' | |
- build-for: 'i386' | |
- build-for: 'riscv64' | |
runs-on: ubuntu-latest | |
outputs: | |
snap-file: ${{ steps.build-snap.outputs.snap }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create snapcraft.yaml | |
run: | | |
echo "name: tend" > snapcraft.yaml | |
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then | |
echo "version: git" >> snapcraft.yaml | |
else | |
echo "version: ${{ github.ref_name }}" >> snapcraft.yaml | |
fi | |
echo "summary: Quickly spin up/down groups of command-line tasks with automated recovery" >> snapcraft.yaml | |
echo "description: Quickly spin up/down groups of command-line tasks with automated recovery" >> snapcraft.yaml | |
echo "" >> snapcraft.yaml | |
echo "confinement: strict" >> snapcraft.yaml | |
echo "base: core22" >> snapcraft.yaml | |
echo "" >> snapcraft.yaml | |
echo "architectures:" >> snapcraft.yaml | |
echo " - build-on: [amd64]" >> snapcraft.yaml | |
echo " build-for: [${{ matrix.build-for }}]" >> snapcraft.yaml | |
echo "" >> snapcraft.yaml | |
echo "parts:" >> snapcraft.yaml | |
echo " tend:" >> snapcraft.yaml | |
echo " plugin: rust" >> snapcraft.yaml | |
echo " source: ." >> snapcraft.yaml | |
echo "" >> snapcraft.yaml | |
echo "apps:" >> snapcraft.yaml | |
echo " tend:" >> snapcraft.yaml | |
echo " command: bin/tend" >> snapcraft.yaml | |
cat snapcraft.yaml | |
- uses: snapcore/action-build@v1 | |
id: build-snap | |
- if: matrix.build-for == 'amd64' | |
run: | | |
sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }} | |
- if: matrix.build-for == 'amd64' | |
run: | | |
tend --version | |
- uses: snapcore/action-publish@v1 | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
env: | |
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
with: | |
snap: ${{ steps.build-snap.outputs.snap }} | |
release: ${{ startsWith(github.ref, 'refs/tags/') && 'stable' || 'edge' }} |