Skip to content

Release Binaries on Tag #18

Release Binaries on Tag

Release Binaries on Tag #18

Workflow file for this run

---
name: Release Binaries on Tag
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
tag-release-lib-build:
name: Build tag as a release
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
TARGET:
- x86_64-unknown-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Toolchain setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.TARGET }}
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: "${{ secrets.CRATES_TOKEN }}"
run: cargo publish -p snapcraft
# Kick off the workflow for the creation of the snapcraft example
tag-release-example-init:
name: Initiate release of the snapcraft example application
runs-on: ubuntu-latest
needs: [tag-release-lib-build]
steps:
- name: Repository Dispatch
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
repo: a1ecbr0wn/snapcraft
ref: ${{ github.ref }}
workflow: release-example.yml
inputs: '{ "example_version": "${{ github.ref_name }}" }'