-
Notifications
You must be signed in to change notification settings - Fork 42
30 lines (29 loc) · 1.13 KB
/
create-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
name: Create tag
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'release version (1.0.0, v1.2.0, etc)'
required: true
jobs:
create-tag:
if: github.ref == 'refs/heads/master'
name: Create tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version-file: ".java-version"
- name: Workflow can be run only on master
run: test "${{ github.ref }}" = "refs/heads/master" || (echo "Release can be created only from master (${{ github.ref }} not supported)." && false)
- name: Set release version (remove "v" of "vX.Y.Z")
run: |
export VERSION=$(echo ${{ github.event.inputs.releaseVersion }} | sed 's/v//')
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- name: Build & create tag
run: |
git config --local user.email "[email protected]"
git config --local user.name "izanami-github-actions"
sbt "release with-defaults release-version ${{ env.RELEASE_VERSION }}"