Skip to content

Release v3.0.9 (#1612) #82

Release v3.0.9 (#1612)

Release v3.0.9 (#1612) #82

Workflow file for this run

# This workflow is triggered when a tag v* is pushed to the repository
# To release to npm, make sure you incremented the version in package.json
# and then run `git tag vx.x.x` and `git push origin vx.x.x`
name: npm-publish
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
publish-cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- name: Publish CLI
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
ping-build-machine:
runs-on: ubuntu-latest
needs: publish-cli
if: github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' && needs.publish-cli.result == 'success'
steps:
- name: Send Repository Dispatch - Prod Docker Build
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ORG_ACCESS_TOKEN }}
repository: genez-io/genezio-build-machine
event-type: redeploy-build-machine-docker-images-prod
- name: Send Repository Dispatch - Prod Runtime Workflows
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ORG_ACCESS_TOKEN }}
repository: genez-io/genezio-build-machine
event-type: redeploy-build-machine-workflows-runtime-prod
generate-release-notes:
runs-on: ubuntu-latest
needs: publish-cli
steps:
- uses: actions/checkout@v4
- name: Generate Release Notes
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
notify:
if: always()
runs-on: ubuntu-latest
needs: publish-cli
steps:
- name: Notify slack
uses: slackapi/[email protected]
with:
method: chat.postMessage
token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: "GitHub Action build result: ${{ needs.publish-cli.result }}\n*Github Action Build Result:* ${{ needs.publish-cli.result }}\n*Repository:* ${{ github.repository }}\n*Branch:* ${{ github.ref }}\n*Workflow:* ${{ github.workflow }}\n*Note: * This will trigger a new build on the build machine"