Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(release): fix dispatch action #1339

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release Every Other Monday
on:
workflow_dispatch:
inputs:
VERSION_NUMBER:
type: string
# Run action at 16:15 PM on Monday (UTC)
# schedule:
# @TODO: the schedule below is weekly. Do byweekly check.
Expand All @@ -13,21 +16,12 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest
outputs:
VERSION_NUMBER: ${{ steps.git-release.outputs.VERSION_NUMBER }}
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
owner: ${{ github.repository_owner }}
repositories: |
veda-ui
veda-config
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
Expand All @@ -37,17 +31,29 @@ jobs:
with:
node-version: ${{ env.NODE }}
- run: yarn
- run: yarn release --ci --verbose
- name: Release through Git
id: git-release
run: yarn release --ci --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
preview-build:
runs-on: ubuntu-latest
needs: "release"
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
owner: ${{ github.repository_owner }}
repositories: |
veda-ui
veda-config
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.generate-token.outputs.token }}
token: ${{steps.generate-token.outputs.token}}
repository: nasa-impact/veda-config
event-type: update-version
client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ env.VERSION_NUMBER }}"}'
client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ needs.release.outputs.VERSION_NUMBER || inputs.VERSION_NUMBER }}"}'
4 changes: 2 additions & 2 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hooks": {
"after:release": "echo \"VERSION_NUMBER=v${version}\" >> \"$GITHUB_ENV\" "
"after:release": "echo \"VERSION_NUMBER=v${version}\" >> \"$GITHUB_OUTPUT\" "
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down Expand Up @@ -28,4 +28,4 @@
"preRelease": false,
"draft": false
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@developmentseed/veda-ui",
"description": "Dashboard",
"version": "5.11.4",
"version": "5.11.3",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting this to 5.11.3 since the action for 5.11.4 succeeded only halfway 😓

"author": {
"name": "Development Seed",
"url": "https://developmentseed.org/"
Expand Down
Loading