-
Notifications
You must be signed in to change notification settings - Fork 2
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
be07ade
commit 111d248
Showing
1 changed file
with
25 additions
and
31 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 |
---|---|---|
|
@@ -13,7 +13,28 @@ jobs: | |
NPM_PASSWORD: '928318' | ||
NPM_EMAIL: '[email protected]' | ||
|
||
release: | ||
name: Release | ||
needs: localNPMRegistry | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- run: npm run build | ||
- run: docker pull verdaccio/verdaccio | ||
- run: docker run -d --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio | ||
- name: Wait for Verdaccio to be ready | ||
|
@@ -40,40 +61,13 @@ jobs: | |
"email": "[email protected]" | ||
}') | ||
token=$(echo $response | jq -r '.token') | ||
echo "NPM_TOKEN: $token" | ||
echo "NPM_TOKEN=$token" >> $GITHUB_ENV | ||
echo "GENERATED_TOKEN: $token" | ||
echo "GENERATED_TOKEN=$token" >> $GITHUB_ENV | ||
- run: | | ||
echo "NPM_TOKEN: $NPM_TOKEN" | ||
- name: Output variable | ||
run: echo "npmtoken=$NPM_TOKEN" >> $GITHUB_OUTPUT | ||
|
||
release: | ||
name: Release | ||
needs: localNPMRegistry | ||
echo "local npm token: ${{env.GENERATED_TOKEN}}" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
- name: Install dependencies | ||
run: npm clean-install | ||
- run: npm run build | ||
- run: | | ||
echo "local npm token: ${{needs.localNPMRegistry.outputs.npmtoken}}" | ||
echo "NPM_TOKEN=${{needs.localNPMRegistry.outputs.npmtoken}}" >> $GITHUB_ENV | ||
- name: Release | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{needs.localNPMRegistry.outputs.npmtoken}} | ||
NPM_TOKEN: ${{env.GENERATED_TOKEN}} |