-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec1253e
commit 67a0f5a
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Release test | ||
|
||
on: | ||
push: | ||
branches: | ||
- release-test | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# - name: Set up Node.js | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: '20.x' | ||
# cache: 'npm' | ||
|
||
# - name: Cache node_modules | ||
# uses: actions/cache@v2 | ||
# env: | ||
# cache-name: cache-node-modules | ||
# with: | ||
# path: | | ||
# node_modules | ||
# */*/node_modules | ||
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-build-${{ env.cache-name }}- | ||
# ${{ runner.os }}-build- | ||
# ${{ runner.os }}- | ||
|
||
- name: Install modules | ||
run: npm ci | ||
|
||
- name: Build icons | ||
run: npm run build:icons | ||
|
||
# - name: Run unit tests | ||
# run: npm run check | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
- name: Version and tag packages | ||
run: npx lerna version --conventional-commits --no-changelog --yes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Configure npm authentication | ||
# run: | | ||
# echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
# - name: Publish packages to npm | ||
# run: npx lerna publish from-package --yes | ||
# env: | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}, | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push changes back to the repo | ||
run: | | ||
git push origin --follow-tags | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create merge-back PR to main | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: "Release - version update" | ||
branch: release-test | ||
base: main | ||
title: 'Release - version update' | ||
body: 'This is an automated PR to merge the release branch into main after version bump and publish.' |