Skip to content

Merge pull request #40 from waldiez/dev #23

Merge pull request #40 from waldiez/dev

Merge pull request #40 from waldiez/dev #23

Workflow file for this run

---
name: Release
# yamllint disable rule:truthy
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
# yarn: latest / berry / stable
- run: |
corepack enable
yarn set version stable
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build:lib
- name: Read changelog
id: changelog
run: |
changelog=$(yarn changelog)
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$changelog" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Release
id: create_release
if: steps.changelog.outputs.changelog != ''
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
# body: the changelog
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Publish to NPM
if: steps.create_release.outputs.id
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish