-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (53 loc) · 1.61 KB
/
tag-engine-release.yaml
File metadata and controls
62 lines (53 loc) · 1.61 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Tag Engine Release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: Release bump
required: true
options:
- patch
- minor
- major
env:
CI: true
WORKING_DIRECTORY: '.'
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: false
permissions:
contents: write
jobs:
tag-release:
name: Create a new release
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
# with:
# token: ${{ secrets.GH_TOKEN_WORKFLOW_PUBLISH }}
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- uses: ./.github/actions/node
with:
working-directory: ${{ env.WORKING_DIRECTORY }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm i --frozen-lockfile --ignore-scripts
- name: tag and prepare release
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pnpm release-it "${{ github.event.inputs.version }}" --ci -V
RELEASE_VERSION=$(cat package.json | jq -r '.version')
echo "release_version=${RELEASE_VERSION}" >> $GITHUB_OUTPUT
- name: Dispatch engine release workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: bff-backup/code
event-type: release-engine
client-payload: '{"ref": "v${{ steps.tag.outputs.release_version }}"}'