Skip to content

Merge pull request #19 from SocialGouv/feat/update-deps #27

Merge pull request #19 from SocialGouv/feat/update-deps

Merge pull request #19 from SocialGouv/feat/update-deps #27

Workflow file for this run

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 }}