fix(ci/cd): Correct workflow /2 #204
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
| name: Release | |
| on: | |
| # can be triggered manually | |
| workflow_dispatch: | |
| # on master merge | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| id-token: write # to enable use of OIDC for trusted publishing and npm provenance | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - name: Install | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Test | |
| run: npm run test:nowatch | |
| - name: Semantic Release | |
| uses: cycjimmy/semantic-release-action@v6 | |
| with: | |
| # semantic_version: 19.0.5 | |
| extra_plugins: | | |
| @semantic-release/changelog@6.0.0 | |
| @semantic-release/git | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| storybook-deploy: | |
| name: Storybook deploy | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 14 | |
| - name: Install | |
| run: npm ci | |
| - name: Deploy | |
| run: npm run deploy-storybook -- --ci | |
| env: | |
| GH_TOKEN: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | |
| notify: | |
| needs: storybook-deploy | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dataesr/mm-notifier-action@v1 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }} | |
| mattermost_channel: bots | |
| deployment_url: https://dataesr.github.io/react-dsfr |