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): release action #1346

Merged
merged 2 commits into from
Dec 19, 2024
Merged
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
31 changes: 14 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,26 @@ on:
permissions:
contents: write

# This action requires a GitHub app with content write access installed
# to bypass the main branch protection rule and dispatch the event to a different repo
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 @@ -36,24 +47,10 @@ jobs:
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}}
repository: nasa-impact/veda-config
event-type: update-version
client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ needs.release.outputs.VERSION_NUMBER || inputs.VERSION_NUMBER }}"}'
client-payload: '{"ref": "${{ github.ref }}", "VERSION_NUMBER": "${{ steps.git-release.outputs.VERSION_NUMBER || inputs.VERSION_NUMBER }}"}'
Loading