-
Notifications
You must be signed in to change notification settings - Fork 146
50 lines (47 loc) · 1.45 KB
/
release.yml
File metadata and controls
50 lines (47 loc) · 1.45 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
name: Release
run-name: Release ${{ github.event.inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: Version Number
type: string
required: true
jobs:
Build:
uses: ./.github/workflows/ci.yml
with:
version: ${{ github.event.inputs.version }}
Release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: Build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download Artifact
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/artifacts
- name: Reorganize files
run: |
mkdir release
cd artifacts
chmod a+x */fakehttp*
for triplet in *; do
tar czvf "../release/$triplet.tar.gz" "$triplet"
done
- name: Make a tag
run: |
git config user.name 'GitHub Actions'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git tag -a '${{ github.event.inputs.version }}' -m '${{ github.event.inputs.version }}'
git push origin '${{ github.event.inputs.version }}'
- name: Make a release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create --title 'v${{ github.event.inputs.version }}' --generate-notes --verify-tag '${{ github.event.inputs.version }}' release/*.tar.gz