-
Notifications
You must be signed in to change notification settings - Fork 102
53 lines (44 loc) · 1.47 KB
/
tarball.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
name: Build a tarball
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
inputs:
version:
description: The version to build the tarball for
required: true
jobs:
BuildTarball:
runs-on: ubuntu-latest
steps:
- name: Determine version to build
id: get-version
run: |
if ${{ github.event_name == 'push' }}; then
version="$( echo '${{ github.ref }}' | sed 's@^refs/tags/v@@' )"
else
version='${{ inputs.version }}'
fi
# assert it's a version number
set -x
[[ ${version} =~ ^[0-9]+.[0-9]+.[0-9]+$ ]] && echo "version=${version}" >> $GITHUB_OUTPUT
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.MIR_BOT_GPG_PRIVATE_KEY }}
- name: Check out code
uses: actions/checkout@v3
with:
ref: v${{ steps.get-version.outputs.version }}
- name: Build the tarball
run: |
./tools/make_release_tarball --skip-checks
gpg --detach-sig --sign --output mir-${{ steps.get-version.outputs.version }}.tar.xz.asc mir-${{ steps.get-version.outputs.version }}.tar.xz
- name: Store the tarball and signature
uses: actions/upload-artifact@v3
with:
name: mir-${{ steps.get-version.outputs.version }}
path: |
mir-${{ steps.get-version.outputs.version }}.tar.xz
mir-${{ steps.get-version.outputs.version }}.tar.xz.asc