-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.02 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
name: semver tag
on:
push:
branches:
- main
permissions:
contents: write
jobs:
semver-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Git
run: |
git config user.name "crusoe-cloud"
git config user.email "[email protected]"
- name: Load versions from text file
run: |
source versions.env
echo "MAJOR_VERSION=${MAJOR_VERSION}" >> $GITHUB_ENV
echo "MINOR_VERSION=${MINOR_VERSION}" >> $GITHUB_ENV
- name: Calculate and set new version
run: |
chmod +x ./scripts/tag_semver.sh
./scripts/tag_semver.sh $MAJOR_VERSION $MINOR_VERSION ""
shell: bash
- name: Read version and push tag
run: |
source variables.env
echo "Calculated version: $RELEASE_VERSION"
source variables.env
git tag $RELEASE_VERSION
git push origin $RELEASE_VERSION