Skip to content

Commit ae9bec9

Browse files
committed
add GitHub Actions workflow for releases
1 parent c398572 commit ae9bec9

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release assets
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Extract version
18+
id: ver
19+
shell: bash
20+
run: |
21+
TAG="${GITHUB_REF_NAME}"
22+
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
23+
24+
- name: Build tarball
25+
shell: bash
26+
run: |
27+
VER="${{ steps.ver.outputs.version }}"
28+
NAME="tamm-${VER}"
29+
30+
git archive \
31+
--format=tar.gz \
32+
--prefix="${NAME}/" \
33+
"$GITHUB_REF_NAME" \
34+
> "${NAME}.tar.gz"
35+
36+
- name: Create / update GitHub Release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
tag_name: ${{ github.ref_name }}
40+
name: tamm ${{ steps.ver.outputs.version }}
41+
body: |
42+
The TAMM ${{ steps.ver.outputs.version }} release is now available.
43+
44+
Documentation available at: https://tamm.readthedocs.io/
45+
files: |
46+
tamm-*.tar.gz
47+

0 commit comments

Comments
 (0)