Skip to content

chore(release): 2.52.18 #213

chore(release): 2.52.18

chore(release): 2.52.18 #213

Workflow file for this run

name: Publish Octuple
on:
push:
tags:
- 'v*'
env:
NODE_VERSION: 20.13.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: yarn
- run: yarn test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- name: Prerelease check
id: prerelease_check
if: contains(steps.tag_name.outputs.current_version, '-')
run: |
echo ::set-output name=prerelease::true
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- name: Run Yarn
run: yarn
- name: Publish release to npm
if: steps.prerelease_check.outputs.prerelease != 'true'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- name: Publish prerelease to npm
if: steps.prerelease_check.outputs.prerelease == 'true'
run: npm publish --tag prerelease
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- name: Get Changelog Entry
id: changelog_reader
uses: artlaman/[email protected]
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create/update release
uses: ncipollo/release-action@v1
with:
name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.prerelease_check.outputs.prerelease == 'true' }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
- run: yarn build-storybook
if: steps.prerelease_check.outputs.prerelease != 'true'
- name: Pushes to another repository
if: steps.prerelease_check.outputs.prerelease != 'true'
uses: cpina/github-action-push-to-another-repository@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'storybook-static'
destination-github-username: 'EightfoldAI'
destination-repository-name: 'octuple.github.io'
user-email: [email protected]
target-branch: main