-
Notifications
You must be signed in to change notification settings - Fork 71
53 lines (50 loc) · 1.38 KB
/
build.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: Source Code tarball
on:
push:
jobs:
archive_source_code:
name: Create source code tarball
runs-on: ubuntu-18.04
env:
ARCHIVE_BASENAME: jack1-${{ github.ref_name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Archive source code
shell: bash
run: |
./autogen.sh
autoreconf -fiv
rm -rf autom4te.cache
rm -f config.h.in~
tar -c -z \
--exclude=".git*" \
--transform="s,^\.,${ARCHIVE_BASENAME}," \
-f ~/${ARCHIVE_BASENAME}.tar.gz \
.
- uses: actions/upload-artifact@v2
with:
name: Source code tarball
path: ~/${{env.ARCHIVE_BASENAME}}.tar.gz
deploy:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-18.04
env:
ARCHIVE_BASENAME: jack1-${{ github.ref_name }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
needs:
- archive_source_code
steps:
- uses: actions/[email protected]
with:
name: Source code tarball
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
files: |
${{ env.ARCHIVE_BASENAME }}.tar.gz