-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (33 loc) · 1.08 KB
/
cut_release.yml
File metadata and controls
42 lines (33 loc) · 1.08 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
name: Cut Release and Create Source Tarball
on:
push:
tags:
- 'offscreen-*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
- name: Extract version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/offscreen-}" >> $GITHUB_ENV
- name: Create VERSION file
run: echo ${{ env.VERSION }} > VERSION.txt
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install git-archive-all
run: pip install git-archive-all
- name: Create source tarball
run: |
git-archive-all --force-submodules --prefix=offscreen-${{ env.VERSION }}/ offscreen-${{ env.VERSION }}.tar
tar -rf offscreen-${{ env.VERSION }}.tar --transform "s|^|offscreen-${{ env.VERSION }}/|" VERSION.txt
gzip offscreen-${{ env.VERSION }}.tar
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: offscreen-${{ env.VERSION }}.tar.gz
path: offscreen-${{ env.VERSION }}.tar.gz