Skip to content

v1.18.3

v1.18.3 #107

Workflow file for this run

# Publishes a GitHub release and NPM package for
# any tag that is pushed to the repository.
# Tags should be generated automatically by
# manually running the "release" workflow.
name: Publish
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
env:
CYPRESS_INSTALL_BINARY: 0
run: yarn install --immutable --immutable-cache
- name: Build
run: yarn build:libs
- name: Release changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./sbin/changelog.py --skip-header single > release-CHANGELOG.md
- name: Release
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: release-CHANGELOG.md
draft: false
prerelease: false
- name: Upload changelog
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: CHANGELOG.md
asset_name: CHANGELOG.md
asset_content_type: text/markdown
- name: Deploy NPM packages
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
if [[ $GITHUB_REF =~ alpha|beta ]]; then
yarn workspaces foreach --no-private npm publish --tag next
else
yarn workspaces foreach --no-private npm publish --tag latest
fi