chore/trusted-npm (#1169) #155
This file contains hidden or 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
| # This is a basic workflow to help you get started with Actions | |
| name: Publish | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the main branch | |
| push: | |
| branches: [main] | |
| jobs: | |
| build_deploy_test: | |
| name: 🛠️ Build and 🚀 Deploy to radix | |
| uses: ./.github/workflows/build_deploy_radix.yaml | |
| with: | |
| environment-name: main | |
| to-environment: test | |
| branch: main | |
| publish: | |
| name: Publish to NPM | |
| uses: ./.github/workflows/npm_publish.yaml | |
| release: | |
| needs: [publish] | |
| name: Create release notes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get npm version | |
| id: package-version | |
| uses: martinbeentjes/[email protected] | |
| - name: Generate release notes | |
| run: gh release create v${{steps.package-version.outputs.current-version}} --generate-notes --target ${{github.sha}} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| promote_to_prod: | |
| needs: [build_deploy_test, release] | |
| name: 🚀 Promote to production radix | |
| uses: ./.github/workflows/promote.yaml | |
| with: | |
| environment-name: main | |
| from-environment: test | |
| to-environment: production |