-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.45 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
name: tag-release
on:
push:
tags:
- "*.*.*"
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 30
env:
COMPONENT_NAME: OpenConext-user-lifecycle
if: always()
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: OpenConext/Stepup-Build
- name: Output the semver tag to the tag variable
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Run release script
run: ./stepup-build.sh ${COMPONENT_NAME} --tag ${{ steps.vars.outputs.tag }}
- name: Grab the archive filename
id: archive
run: |
echo "archive=$(find . -maxdepth 1 -name "$COMPONENT_NAME*.tar.bz2" -printf '%f\n')" >> $GITHUB_OUTPUT
echo "shasum=$(find . -maxdepth 1 -name "$COMPONENT_NAME*.sha" -printf '%f\n')" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
${{ steps.archive.outputs.archive }}
${{ steps.archive.outputs.shasum }}
token: ${{ secrets.GITHUB_TOKEN }}
fail_on_unmatched_files: true
generate_release_notes: true
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