Release Every Other Monday #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Every Other Monday | |
on: | |
workflow_dispatch: | |
# Run action at 16:15 PM on Monday (UTC) | |
# schedule: | |
# @TODO: the schedule below is weekly. Do byweekly check. | |
# - cron: '15 16 * * 1' | |
# Sets the GITHUB_TOKEN permissions to allow release | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
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}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Use Node.js ${{ env.NODE }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE }} | |
- run: yarn | |
- run: yarn release --ci --verbose | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
preview-build: | |
runs-on: ubuntu-latest | |
needs: "release" | |
steps: | |
- 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": "${{ env.VERSION_NUMBER }}"}' |