Continuous Deployment #929
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: Continuous Deployment | |
on: | |
workflow_run: | |
workflows: ["Continuous Integration"] | |
branches: [main, beta] | |
types: | |
- completed | |
concurrency: | |
group: npm | |
permissions: | |
contents: write | |
deployments: read | |
issues: write | |
pull-requests: write | |
env: | |
HUSKY: 0 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
environment: | |
name: npm | |
url: https://www.npmjs.com/package/postdfm | |
steps: | |
- uses: actions/checkout@v4 | |
# unlike with ci, we only want the latest version to deploy with | |
- name: setup node.js | |
uses: actions/[email protected] | |
with: | |
node-version: latest | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn generate | |
- run: yarn compile | |
- run: yarn release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |