Merge pull request #19 from SocialGouv/feat/update-deps #27
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: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Yarn cache setup | |
uses: c-hive/gha-yarn-cache@v2 | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --prefer-offline | |
- name: Build | |
run: yarn build | |
- name: Set Registry token | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.SOCIALGROOVYBOT_NPM_TOKEN }} | |
- name: Publish to NPM | |
run: yarn publish --non-interactive --access public | |
env: | |
NPM_TOKEN: ${{ secrets.SOCIALGROOVYBOT_NPM_TOKEN }} | |
if: steps.version_check.outputs.VERSION_CHANGED == 'true' | |
- name: Semantic Release | |
id: semantic | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
extends: | | |
@socialgouv/releaserc | |
semantic_version: 17 | |
extra_plugins: | | |
@semantic-release/changelog@5.0.1 | |
@semantic-release/git@9.0.0 | |
env: | |
GIT_AUTHOR_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_AUTHOR_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |