-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (35 loc) · 1.07 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
name: Release Action
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (i.e. v1.2.3)'
required: true
type: string
jobs:
release:
name: Release Action
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
name: Checkout Repository
with:
token: ${{ secrets.VIB_ACTION_TOKEN }}
- name: Set Node.js 20
uses: actions/setup-node@v2
with:
node-version: 20.x
- name: Git config
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Release version
run: npm version --allow-same-version=true ${{ inputs.version }} -m "[AUTOMATED] Release version %s"
- name: Roll major tag
run: |
VERSION="${{ inputs.version }}"
VERSION_MAJOR="${VERSION%%\.*}"
git tag -f $VERSION_MAJOR ${{ inputs.version }}
- name: Push rolling major tag
run: git push --tags --force