-
Notifications
You must be signed in to change notification settings - Fork 21
54 lines (45 loc) · 1.52 KB
/
release-tarball.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
54
name: Release tarball
on:
push:
tags:
- "**"
jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Determine tag"
id: "determine-tag"
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/v}\""
- name: "Determine configure.ac version"
id: "determine-ac"
run: "echo \"::set-output name=version::`sed -n -E 's/AC_INIT\\(\\[dcfldd\\], \\[(.+?)\\],.*$/\\1/p' configure.ac`\""
- name: "Fail when tag version != configure.ac version"
run: "exit 1"
if: steps.determine-tag.outputs.tag != steps.determine-ac.outputs.version
- name: Build and check distribution tarball
run: |
./autogen.sh
./configure
make distcheck
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.determine-tag.outputs.tag }}
release_name: Release ${{ steps.determine-tag.outputs.tag }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dcfldd-${{ steps.determine-tag.outputs.tag }}.tar.gz
asset_name: dcfldd-${{ steps.determine-tag.outputs.tag }}.tar.gz
asset_content_type: application/gzip