-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.32 KB
/
pipeline-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
74
75
76
77
78
79
80
81
82
83
84
name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.token }}
on:
push:
branches:
- main
- master
jobs:
artifact:
uses: h2-invent/jitsi-admin-matrix-bot/.github/workflows/task-artifact.yml@master
create_release:
needs:
- artifact
runs-on: ubuntu-latest
outputs:
create_release_output: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: paulhatch/semantic-version@v5.0.2
id: version
with:
tag_prefix: ""
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
change_path: .
version_format: "${major}.${minor}.${patch}"
- name: Write semantic Version in config file
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "<version-addhere>"
replace: "${{ steps.version.outputs.version }}"
regex: false
- uses: actions/download-artifact@v3
with:
name: artifact_${{github.run_number}}
- run: unzip -qq artifact_${{github.run_number}}.zip -d artifact
- name: Archive Release for application
uses: thedoctor0/zip-release@0.7.1
with:
type: 'zip'
filename: 'application.zip'
exclusions: '*.git* *.github*'
directory: artifact
- name: Create new Release with semantic-version tag
uses: ncipollo/release-action@v1
id: create_release
with:
draft: false
prerelease: false
name: Release ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.version }}
artifacts: artifact/application.zip
artifactContentType: application/zip
bodyFile: RELEASE_NOTE.md
upload_dockerhub_main:
needs:
- create_release
uses: h2-invent/jitsi-admin-matrix-bot/.github/workflows/task-upload-docker-hub.yml@master
with:
reponame: 'h2invent/jitsi-admin-matrix-bot'
dockerfile_path: './Dockerfile'
directory: '.'
version: h2invent/jitsi-admin-matrix-bot:latest,h2invent/jitsi-admin-matrix-bot:${{ needs.create_release.outputs.create_release_output }}
secrets:
dockerhub_password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}