-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (30 loc) · 1010 Bytes
/
update_ada_version.yml
File metadata and controls
35 lines (30 loc) · 1010 Bytes
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
name: Update ada version
on:
push:
branches:
- '**' # runs on any branch push
tags:
- 'v*' # runs on tag push
workflow_dispatch: # manual trigger possible
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure all tags available
- name: Determine version or branch
run: |
VERSION="${GITHUB_REF_NAME}"
echo "Using version identifier: ${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Update version in ada script
run: |
sed -i".tmp" "s/ADA_VERSION=.*/ADA_VERSION=\"${VERSION}\"/" ada/ada
- name: Commit and push updated ada script
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ada/ada
git commit -m "Set version to ${VERSION}" || echo "No changes"
git push