-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (60 loc) · 1.93 KB
/
release.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Makefile CI
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install requirements
run: sudo apt install -y python3-docutils
- name: configure
run: ./configure
- name: Make dist
run: make dist
- name: Make distsingle
run: make distsingle
- name: Retrieve changes
run: |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "JSON_RESPONSE<<$EOF" >> "$GITHUB_ENV"
./scripts/changelog-latest CHANGELOG.md >> "$GITHUB_ENV"
curl https://example.com >> "$GITHUB_ENV"
echo "$EOF" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ env.CHANGES }}
draft: false
prerelease: false
- name: Get Name of Artifact
run: |
echo "ARTIFACT_1_PATHNAME=$(ls *.tar.gz | head -n 1)" >> $GITHUB_ENV
echo "ARTIFACT_2_PATHNAME=$(ls *.tar.gz | head -n 1)" >> $GITHUB_ENV
- 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: ${{ env.ARTIFACT_1_PATHNAME }}
asset_name: flow.tar.gz
asset_content_type: application/gzip
- name: Upload Second Release Asset
id: upload-release-asset-2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.ARTIFACT_2_PATHNAME }}
asset_name: flow.sh
asset_content_type: application/x-sh