-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.3 KB
/
release-lib.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
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 }}" }'