Skip to content

Commit

Permalink
Update release notes workflow (#322)
Browse files Browse the repository at this point in the history
* Update release notes workflow

* Update tag name

* Update workflow

* Update code owner

* Delete .gitmodules file

* Update permission in sync-label workflow

* Update permission in publish package workflow
  • Loading branch information
bonnie57 authored Dec 6, 2024
1 parent 21fd04f commit b2e76ef
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 205 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @LeoHChen @DonFungible @edisonz0718 @jacob-tucker @AndyBoWu
* @LeoHChen @DonFungible @edisonz0718 @jacob-tucker @AndyBoWu @allenchuang
68 changes: 68 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Reusable workflow to create release in GitHub

on:
workflow_call:
inputs:
tag_name:
type: string
required: true
description: "Tag name to be published"
is_core_sdk:
type: boolean
description: "Flag to indicate if this is a core SDK release"
required: true
last_tag:
type: string
description: "last tag name"
required: true

permissions:
contents: write
actions: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Tag and Push
id: tag_and_push
run: |
TAG_NAME=${{ inputs.tag_name}}
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git tag -a $TAG_NAME -m "Release $TAG_NAME"
git push origin $TAG_NAME
echo "The tag $TAG_NAME has been created and pushed to the repository"
echo "The tag $LATEST_TAG has been created and pushed to the repository"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set Configuration File
id: set_config
run: |
if [ "${{ inputs.is_core_sdk }}" = "true" ]; then
echo "config_file=configs/configuration.json" >> $GITHUB_ENV
else
echo "config_file=configs/configuration_react.json" >> $GITHUB_ENV
fi
- name: "Build Changelog"
id: github_release
uses: mikepenz/release-changelog-builder-action@a57c1b7c90e56d9c8b26a6ed5d1eed159369e117
with:
configuration: ${{ env.config_file }}
toTag: ${{ inputs.tag_name}}
fromTag: ${{ inputs.last_tag}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: mikepenz/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974
with:
body: ${{steps.github_release.outputs.changelog}}
tag_name: ${{ inputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 0 additions & 9 deletions .github/workflows/pr-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
types: [opened, synchronize]
branches:
- dev
- dev_v1.1

jobs:
Timestamp_PR_CREATED:
Expand All @@ -30,13 +29,5 @@ jobs:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: "beta-sepolia"
secrets:
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}
SEPOLIA_RPC_PROVIDER_URL: ${{ secrets.SEPOLIA_RPC_PROVIDER_URL }}
TEST_SEPOLIA_RPC_PROVIDER_URL: ${{ secrets.TEST_SEPOLIA_RPC_PROVIDER_URL }}
SEPOLIA_WALLET_PRIVATE_KEY: ${{ secrets.SEPOLIA_WALLET_PRIVATE_KEY }}
SEPOLIA_TEST_WALLET_ADDRESS: ${{ secrets.SEPOLIA_TEST_WALLET_ADDRESS }}
STORY_TEST_NET_RPC_PROVIDER_URL: ${{ secrets.STORY_TEST_NET_RPC_PROVIDER_URL }}
STORY_TEST_NET_WALLET_PRIVATE_KEY: ${{ secrets.STORY_TEST_NET_WALLET_PRIVATE_KEY }}
STORY_TEST_NET_TEST_WALLET_ADDRESS: ${{ secrets.STORY_TEST_NET_TEST_WALLET_ADDRESS }}
12 changes: 0 additions & 12 deletions .github/workflows/pr-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ on:
branches:
- main
- dev
- v1.1
- dev_v1.1

pull_request:
branches:
- main
- dev
- v1.1
- dev_v1.1

jobs:
Timestamp:
Expand All @@ -27,13 +23,5 @@ jobs:
sha: ${{ github.event.pull_request.head.sha }}
ENVIRONMENT: "beta-sepolia"
secrets:
RPC_PROVIDER_URL: ${{ secrets.RPC_PROVIDER_URL }}
WALLET_PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }}
TEST_WALLET_ADDRESS: ${{ secrets.TEST_WALLET_ADDRESS }}
SEPOLIA_RPC_PROVIDER_URL: ${{ secrets.SEPOLIA_RPC_PROVIDER_URL }}
TEST_SEPOLIA_RPC_PROVIDER_URL: ${{ secrets.TEST_SEPOLIA_RPC_PROVIDER_URL }}
SEPOLIA_WALLET_PRIVATE_KEY: ${{ secrets.SEPOLIA_WALLET_PRIVATE_KEY }}
SEPOLIA_TEST_WALLET_ADDRESS: ${{ secrets.SEPOLIA_TEST_WALLET_ADDRESS }}
STORY_TEST_NET_RPC_PROVIDER_URL: ${{ secrets.STORY_TEST_NET_RPC_PROVIDER_URL }}
STORY_TEST_NET_WALLET_PRIVATE_KEY: ${{ secrets.STORY_TEST_NET_WALLET_PRIVATE_KEY }}
STORY_TEST_NET_TEST_WALLET_ADDRESS: ${{ secrets.STORY_TEST_NET_TEST_WALLET_ADDRESS }}
Loading

0 comments on commit b2e76ef

Please sign in to comment.