-
Notifications
You must be signed in to change notification settings - Fork 16
38 lines (31 loc) · 902 Bytes
/
tag.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
name: Create Tag
on:
push:
branches:
- 'release'
jobs:
add-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: madhead/read-java-properties@latest
id: version
with:
file: "./gradle.properties"
property: version
default: 0.0.1
- name: Create Git tag
uses: actions/github-script@v7
with:
script: |
const versionOutputs = ${{ toJSON(steps.version.outputs) }};
var version = versionOutputs.value;
console.log("Version: " + version);
var ref = "refs/tags/" + version
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref,
sha: context.sha
});