-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: release alpha version on every push to main branch
- Loading branch information
Showing
5 changed files
with
44 additions
and
17 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,25 @@ | ||
name: Release alpha version | ||
description: Runs npm script to release alpha version and pushes tags to github | ||
inputs: | ||
npm-token: | ||
description: Token to push code with | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure git user | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "empathy/x" | ||
shell: bash | ||
- name: Create .npmrc file with authorization token | ||
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
shell: bash | ||
env: | ||
NPM_TOKEN: ${{ inputs.npm-token }} | ||
- name: Publish release | ||
run: npm run release:alpha | ||
shell: bash | ||
- name: Push changes to GitHub | ||
run: git push --follow-tags | ||
shell: bash |
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 |
---|---|---|
@@ -1,14 +1,23 @@ | ||
name: Check branch is releasable | ||
name: Check branch is releasable and release alpha on main branch update | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: cypress/browsers:node14.17.0-chrome91-ff89 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.SUPPORT_TOKEN }} | ||
- name: Install lerna and all packages | ||
run: npm ci | ||
- name: Run linter in all packages | ||
run: npm run lint | ||
- name: Run tests in all packages | ||
run: npm run test | ||
- name: Release alpha on non-release pushes to main branch | ||
if: ${{ github.ref_name == 'main' && github.actor != 'support-empathy' && !startsWith(github.event.head_commit.message, 'chore(release):') }} | ||
uses: ./.github/actions/release-alpha | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Release alpha version | ||
name: Release alpha version on demand | ||
on: [workflow_dispatch] | ||
jobs: | ||
release-alpha: | ||
|
@@ -15,15 +15,7 @@ jobs: | |
run: npm run lint | ||
- name: Run tests in all packages | ||
run: npm run test | ||
- name: Configure git user | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "empathy/x" | ||
- name: Create .npmrc file with authorization token | ||
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Publish release | ||
run: npm run release:alpha | ||
- name: Push changes to GitHub | ||
run: git push --follow-tags | ||
- name: Call release alpha action | ||
uses: ./.github/actions/release-alpha | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} |
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
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