-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (71 loc) · 2.51 KB
/
tag-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
name: tag-release
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
COMPONENT_NAME: Stepup-Webauthn
if: always()
steps:
- name: Checkout
uses: actions/checkout@v2
with:
repository: OpenConext/Stepup-Build
ref: master
- name: Output the semver tag to the tag variable
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Run release script
run: ./stepup-build.sh ${COMPONENT_NAME} --tag ${{ steps.vars.outputs.tag }}
- name: Grab the archive filename
id: archive
run: |
echo ::set-output name=archive::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.tar.bz2" -printf '%f\n')
echo ::set-output name=shasum::$(find . -maxdepth 1 -name "$COMPONENT_NAME*.sha" -printf '%f\n')
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.tag }}
release_name: ${{ steps.vars.outputs.tag }}
body: Auto generated release. Please update these release notes manually.
draft: true
prerelease: false
- uses: actions/[email protected]
name: Upload the release artefact tarbal
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.archive.outputs.archive }}
asset_name: ${{ steps.archive.outputs.archive }}
asset_content_type: application/gzip
- uses: actions/[email protected]
name: Upload the release artefact verification shasum
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.archive.outputs.shasum }}
asset_name: ${{ steps.archive.outputs.shasum }}
asset_content_type: text/plain
- uses: eregon/publish-release@v1
name: Publish the new release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ steps.create_release.outputs.id }}
after_build:
needs: build
runs-on: ubuntu-latest
steps:
- name: Trigger Docker container build
uses: benc-uk/workflow-dispatch@v1
with:
workflow: build-push-docker-image.yml