-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (47 loc) · 1.38 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
name: release main
on:
push:
branches:
- main
paths:
- "tools/*"
- ".github/workflows/release.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
env:
RELEASE_FILE_NAME: tools.tar.gz
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Package tools
run: |
tar -czf ${{ env.RELEASE_FILE_NAME }} -C ./tools .
- name: Compute Next Tag Name
run: |
LAST_TAG=$(git describe --tags --abbrev=0 || echo "v0.0.0")
NEXT_PATCH_VERSION=$(echo ${LAST_TAG} | awk -F. -v OFS=. '{$NF += 1 ; print}')
echo "NEXT_PATCH_VERSION=$NEXT_PATCH_VERSION" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.RELEASE_FILE_NAME }}
tag_name: ${{ env.NEXT_PATCH_VERSION }}
trigger-pipeline:
runs-on: ubuntu-latest
needs: release
steps:
- name: Trigger CI Images
env:
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
run: |
gh workflow run push.yaml \
--field upstream_job="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
--field upstream_repository=gha-tools \
--repo rapidsai/ci-imgs \
--ref main