-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (25 loc) · 942 Bytes
/
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
# Example trigger on release
name: release
on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Event triggerred
run: echo "Event Name [${{ github.event_name }}]"
- name: Default branch
run: echo "Default branch [${{ github.event.repository.default_branch }}]"
- name: Run on release
if: ${{ github.event_name == 'release' }}
run: echo "Run this step on release"
- name: Release tag - method 1
run: echo "${{ github.ref }}" | sed 's|^refs/tags/\(.*\)$|TAGA=\1|g' >> $GITHUB_ENV
- name: Release tag - method 2
run: echo "TAGB=${GITHUB_REF#refs/tags/*}" >> $GITHUB_ENV
- name: Release tag - display
run: |
echo "Method 1 - ${{ env.TAGA }}"
echo "Method 2 - ${{ env.TAGB }}"