Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add prerelease workflow #310

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: prerelease
on:
workflow_dispatch:

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0

- name: Configure git user
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'

- name: Install dependencies
run: node common/scripts/install-run-rush.js install

- name: Build project
run: node common/scripts/install-run-rush.js build

- name: Publish npm packages
run: node common/scripts/install-run-rush.js publish --apply --version-policy npm --partial-prerelease --publish --tag beta --prerelease-name beta.${GITHUB_SHA::6}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: release/arrowsquid
fetch-depth: 0
Expand All @@ -17,14 +17,6 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'

- name: Write npm credentials
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> common/config/rush/.npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> common/config/rush/.npmrc-publish
cd common/config/rush && npm whoami
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Install dependencies
run: node common/scripts/install-run-rush.js install

Expand All @@ -33,3 +25,5 @@ jobs:

- name: Publish npm packages
run: node common/scripts/install-run-rush.js publish --include-all --version-policy npm --target-branch release/arrowsquid --publish --tag latest
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3 changes: 1 addition & 2 deletions common/config/rush/.npmrc-publish
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@

always-auth=true
registry=https://registry.npmjs.org/
//localhost:4873/:_authToken=foo
# //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
Loading