-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (40 loc) · 1.22 KB
/
beta-release.yml
File metadata and controls
48 lines (40 loc) · 1.22 KB
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
44
45
46
47
48
name: Release Beta
run-name: Release Beta ${{ inputs.version }} ${{ github.actor }} ${{ github.event_name }}
on:
workflow_dispatch:
permissions:
contents: read
jobs:
create-beta-tag:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag: ${{ steps.version-and-tag.outputs.tag }}
steps:
- uses: actions/checkout@v5
with:
ref: 'main'
fetch-depth: 0
fetch-tags: true
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Tag
id: version-and-tag
run: |
PKG_VERSION=$(jq -r .version package.json)
TAG="v${PKG_VERSION}-beta"
git tag "$TAG"
echo "Created tag from branch=$(git rev-parse --abbrev-ref HEAD), commit=$(git rev-parse HEAD), tag=$(git describe --tags --exact-match)"
git push origin "$TAG"
echo "tag=$TAG" >> $GITHUB_OUTPUT
call-release:
needs: [create-beta-tag]
uses: ./.github/workflows/release.yml
permissions:
contents: write
pull-requests: write
with:
tag: ${{ needs.create-beta-tag.outputs.tag }}