Skip to content

Commit c6c4258

Browse files
authored
chore: add changelog and change workflows (#174)
2 parents 6eca2be + 690acd4 commit c6c4258

6 files changed

+36
-90
lines changed

.github/workflows/create-PR-deploy-to-feature.yml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.github/workflows/create-PR-deploy-to-release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- deploy/*
7+
pull_request:
8+
branches:
9+
- deploy/*
710

811
env:
912
HEAD_BRANCH: ${{ github.head_ref || github.ref_name }}
@@ -25,12 +28,32 @@ jobs:
2528
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2629
with:
2730
ref: 'release/${{ env.VERSION }}'
31+
fetch-depth: 0
32+
fetch-tags: 'true'
33+
34+
- name: Get Testnet Latest Tag
35+
if: ${{ env.NETWORK == 'testnet' }}
36+
run: |
37+
echo "LATESTTAG=$(git describe --tags --match "*testnet*" --abbrev=0)" >> $GITHUB_ENV
38+
39+
- name: Get Mainnet Latest Tag
40+
if: ${{ env.NETWORK == 'mainnet' }}
41+
run: |
42+
echo "LATESTTAG=$(git describe --tags --match "*mainnet*" --abbrev=0)" >> $GITHUB_ENV
2843
2944
- name: Reset promotion branch
3045
run: |
3146
git fetch origin ${HEAD_BRANCH}:${HEAD_BRANCH}
3247
git reset --hard ${HEAD_BRANCH}
3348
49+
- name: Generate Release note
50+
id: template
51+
uses: heinrichreimer/action-github-changelog-generator@e60b5a2bd9fcd88dadf6345ff8327863fb8b490f # v2.4.0
52+
with:
53+
token: ${{ secrets.GITHUB_TOKEN }}
54+
sinceTag: ${{ env.LASTESTTAG}}
55+
headerLabel: '## Changes log of ${{ env.VERSION }} release'
56+
3457
- name: Create Pull Request
3558
id: cpr
3659
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 #v5.0.2
File renamed without changes.
File renamed without changes.

.github/workflows/create-PR-release-to-network.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
types:
88
- closed
99

10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
env:
1115
HEAD_BRANCH: ${{ github.head_ref || github.ref_name }}
1216
RELEASE_BRANCH: ${{ github.event.pull_request.base.ref}}

.github/workflows/create-release-tag.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
env:
1111
HEAD_BRANCH: ${{ github.head_ref || github.ref_name }}
1212

13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
1317
jobs:
1418
create-release-tag:
1519
runs-on: ubuntu-latest
@@ -24,6 +28,8 @@ jobs:
2428
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2529
with:
2630
ref: ${{ env.NETWORK }}
31+
fetch-depth: 0
32+
fetch-tags: 'true'
2733

2834
- name: Set Mainnet Tag
2935
if: ${{ env.NETWORK == 'mainnet' }}
@@ -38,12 +44,12 @@ jobs:
3844
- name: Get Testnet Latest Tag
3945
if: ${{ env.NETWORK == 'testnet' }}
4046
run: |
41-
echo "LATEST_TAG=$(git describe --tags --match "*testnet*" --abbrev=0)" >> $GITHUB_ENV
47+
echo "LATESTTAG=$(git describe --tags --match "*testnet*" --abbrev=0)" >> $GITHUB_ENV
4248
4349
- name: Get Mainnet Latest Tag
4450
if: ${{ env.NETWORK == 'mainnet' }}
4551
run: |
46-
echo "LATEST_TAG=$(git describe --tags --match "*mainnet*" --abbrev=0)" >> $GITHUB_ENV
52+
echo "LATESTTAG=$(git describe --tags --match "*mainnet*" --abbrev=0)" >> $GITHUB_ENV
4753
4854
- name: Create release
4955
env:
@@ -54,5 +60,5 @@ jobs:
5460
--repo "$GITHUB_REPOSITORY" \
5561
--title "${{ env.NETWORK }} release ${{ env.VERSION }}" \
5662
--target "${{ env.NETWORK }}" \
57-
--notes-start-tag "${{ env.LATEST_TAG }}" \
63+
--notes-start-tag "${{ env.LATESTTAG }}" \
5864
--generate-notes

0 commit comments

Comments
 (0)