-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.36 KB
/
release.yml
File metadata and controls
51 lines (43 loc) · 1.36 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
name: Release Tarball
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Extract version
id: version
run: |
VERSION=$(python3 -c "import json; print(json.load(open('version.json'))['version'])")
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "Building hatchery v${VERSION}"
- name: Build tarball
run: |
chmod +x scripts/package.sh
bash scripts/package.sh
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
hatchery-${{ steps.version.outputs.version }}.tar.gz
hatchery-${{ steps.version.outputs.version }}.tar.gz.sha256
- name: Upload artifacts (manual run)
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: hatchery-${{ steps.version.outputs.version }}
path: |
hatchery-${{ steps.version.outputs.version }}.tar.gz
hatchery-${{ steps.version.outputs.version }}.tar.gz.sha256