Release #72
This file contains 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: CI Release | |
run-name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
package-release: | |
name: Package Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository ποΈ | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Build ποΈ | |
uses: ./.github/actions/build | |
- name: Create .npmrc π | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
echo "git-checks=false" >> .npmrc | |
- name: Bump version π | |
run: pnpm bump-version | |
- name: Publish to registry π | |
run: pnpm release | |
- name: Sync release info π | |
id: sync_release | |
run: | | |
version=$(node -e "console.log(require('./package.json').version)") | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git config pull.ff true | |
git add . && git commit -m "CI: @sliit-foss/automatic-versioning - sync release" || true | |
git tag $version || true | |
git pull --rebase && git push origin --tags | |
echo "version=$version" >> $GITHUB_OUTPUT | |
- name: Create release on GitHub π | |
uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
tag: v${{steps.sync_release.outputs.version}} | |
site-release: | |
name: Site Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository ποΈ | |
uses: actions/checkout@v3 | |
- name: Build ποΈ | |
uses: ./.github/actions/build | |
with: | |
storybooks: true | |
- name: Create .nojekyll file π§ | |
run: touch ./storybook-static/.nojekyll | |
- name: Fix 404 on page reload π§ | |
run: cp storybook-static/index.html storybook-static/404.html | |
- name: Deploy π | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./storybook-static/ | |
branch: gh-pages | |
clean-exclude: preview |