-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for manual publish alpha versions
- Loading branch information
1 parent
12fbf2f
commit 1cdc7d0
Showing
2 changed files
with
94 additions
and
33 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,64 @@ | ||
name: "(▶) Publish Alpha Version" | ||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
createAlphaVersion: | ||
name: 'Create Alpha Version' | ||
runs-on: macos-12 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
|
||
- name: Lint files | ||
run: npm run lint | ||
|
||
- name: Check licenses | ||
id: check_licenses | ||
run: | | ||
npm install -g license-checker | ||
license-checker --failOn "AGPL-1.0-only;AGPL-1.0-or-later;AGPL-3.0-only;AGPL-3.0-or-later;GPL-1.0-only;GPL-1.0-or-later;GPL-2.0-only;GPL-2.0-or-later;GPL-3.0-only;GPL-3.0-or-later;LGPL-2.0-only;LGPL-2.0-or-later;LGPL-2.1-only;LGPL-2.1-or-later;LGPL-3.0-only;LGPL-3.0-or-later;LGPLLR;MPL-1.1" | ||
- name: Git Identity | ||
run: | | ||
git config --global user.name 'frontegg' | ||
git config --global user.email '[email protected]' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Authenticate with Registry | ||
run: | | ||
echo "init-author-name=Frontegg LTD" > .npmrc | ||
echo "[email protected]" >> .npmrc | ||
echo "init-author-url=https://frontegg.com" >> .npmrc | ||
echo "init-license=MIT" >> .npmrc | ||
echo "always-auth=true" >> .npmrc | ||
echo "registry=https://registry.npmjs.org" >> .npmrc | ||
echo "@frontegg:registry=https://registry.npmjs.org" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | ||
npm whoami | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
|
||
- name: Publish Pre-Release version to NPM | ||
id: publish_pre_release_version | ||
run: | | ||
version=$(node -p 'require("./package.json").version') | ||
echo "::set-output name=LIB_VERSION::${version}" | ||
echo "Publishing DEV version - v${version}-alpha.${{ github.run_id }}" | ||
yarn version --new-version "${version}-alpha.${{ github.run_id }}" --no-git-tag-version --no-commit-hooks | ||
git add . | ||
git commit -m "chore: prelrease version" | ||
npm run build | ||
npm publish --tag next | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_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