Repository navigation
68 lines (68 loc) · 2.37 KB
/
Copy pathrelease.yml
File metadata and controls
68 lines (68 loc) · 2.37 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: Existing version tag (vX.Y.Z) committed through a reviewed PR
type: string
required: true
push:
tags: ['v*']
permissions: {}
concurrency:
group: release-${{ github.event_name == 'push' && github.ref_name || inputs.tag }}
cancel-in-progress: false
jobs:
resolve:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.tag }}
version: ${{ steps.tag.outputs.version }}
steps:
- id: tag
shell: bash
env:
TAG: ${{ github.event_name == 'push' && github.ref_name || inputs.tag }}
run: |
set -euo pipefail
[[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([+-][0-9A-Za-z.-]+)?$ ]] || {
echo "tag must be v-prefixed semver" >&2
exit 2
}
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
module-release:
needs: resolve
permissions:
contents: write
uses: tinyhumansai/.github/.github/workflows/module-release.yml@4adc1080fb495098e7af1aade82ed7e6e3c69bb7
with:
tag: ${{ needs.resolve.outputs.tag }}
version: ${{ needs.resolve.outputs.version }}
module-crate: tinycomputer
apt-packages: libasound2-dev libxdo-dev
verify-published:
name: Verify published Ubuntu module
needs: [resolve, module-release]
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ needs.resolve.outputs.tag }}
submodules: recursive
persist-credentials: false
- uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable as of 2026-10-10
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Install Linux build and runtime dependencies
run: |
sudo apt-get update
sudo apt-get install --yes libasound2-dev libxdo-dev
- name: Download and load the published module through TinyBus
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
RELEASE_TAG: ${{ needs.resolve.outputs.tag }}
VERSION: ${{ needs.resolve.outputs.version }}
run: scripts/verify-published-release.sh "$REPOSITORY" "$RELEASE_TAG" "$VERSION"