-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (71 loc) · 2.19 KB
/
release.yaml
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
74
75
76
77
78
79
80
81
82
83
84
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-24.04
if: github.event.head_commit.message == 'Release'
steps:
- name: Notify Slack - Starting
uses: act10ns/slack@v2
with:
status: starting
channel: '#collection_release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Checkout
uses: actions/checkout@v4
- name: Set ansible galaxy token
run: |
cat << EOF > ./galaxy_token
token: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
EOF
- name: Set up system
uses: ./.manala/github/system/setup
- name: Get metadata from galaxy.yml
id: metadata
uses: CumulusDS/[email protected]
with:
file: ./galaxy.yml
- name: Build
id: build
run: |
make build VERBOSE=1
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
path: ./manala-path-${{ steps.metadata.outputs.version }}.tar.gz
name: manala-path-${{ steps.metadata.outputs.version }}
retention-days: 1
- name: Publish
id: publish
run: |
make publish VERBOSE=1
- name: Get Changelog entry
id: changelog
uses: mindsers/changelog-reader-action@v2
with:
path: ./CHANGELOG.md
version: ${{ steps.metadata.outputs.version }}
- name: Create GitHub Release
id: release
uses: ncipollo/release-action@v1
with:
name: manala-path ${{ steps.metadata.outputs.version }}
tag: ${{ steps.metadata.outputs.version }}
body: ${{ steps.changelog.outputs.changes }}
artifacts: ./manala-path-${{ steps.metadata.outputs.version }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
skipIfReleaseExists: true
- name: Notify Slack - Status
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
channel: '#collection_release'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()