forked from humblebeeai/script-common
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.04 KB
/
2.create-release.yml
File metadata and controls
40 lines (37 loc) · 1.04 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
name: 2. Create Release
on:
workflow_dispatch:
workflow_run:
workflows: ["1. Bump Version"]
types:
- completed
push:
tags:
- "v*.*.*-*"
env:
_WORKFLOW_STATE: active
jobs:
create_release:
name: Create Release
runs-on: ubuntu-24.04
permissions:
contents: write
actions: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Get latest version
run: |
git pull origin main
echo "Current version: v$(./scripts/get-version.sh)"
- name: Create release
run: ./scripts/release.sh
- name: Check Workflow
run: |
_WORKFLOW_STATE=$(gh api repos/$(gh repo view --json nameWithOwner -q .nameWithOwner)/actions/workflows/3.update-changelog.yml | jq -r '.state')
echo "_WORKFLOW_STATE=${_WORKFLOW_STATE}" >> ${GITHUB_ENV}
- name: Trigger Changelog
if: ${{ env._WORKFLOW_STATE == 'active' }}
run: gh workflow run 3.update-changelog.yml