fix: artifacts
This commit is contained in:
parent
3d97659f94
commit
4b71522ed2
1 changed files with 15 additions and 31 deletions
|
@ -16,6 +16,7 @@ jobs:
|
|||
steps:
|
||||
- name: Git Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Restore Node Modules Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
|
@ -33,31 +34,11 @@ jobs:
|
|||
- name: Run Tests
|
||||
run: npm test
|
||||
|
||||
- name: Save dist/ for later steps
|
||||
run: |
|
||||
mkdir -p /tmp/artifacts
|
||||
cp -r dist /tmp/artifacts
|
||||
|
||||
prepare-package:
|
||||
runs-on: docker
|
||||
needs: build-and-test
|
||||
container:
|
||||
image: node:20-alpine
|
||||
if: github.ref == 'refs/heads/development' || startsWith(github.ref, 'refs/heads/release-no-verify/')
|
||||
steps:
|
||||
- name: Git Clone
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Restore dist/
|
||||
run: cp -r /tmp/artifacts/dist ./
|
||||
|
||||
- name: Prepare Package
|
||||
run: |
|
||||
apk add --no-cache git
|
||||
cp package.json dist/
|
||||
cp README.md dist/
|
||||
npm version patch -m "[skip CI] Version %s"
|
||||
git push
|
||||
- uses: actions/upload-artifact@v4
|
||||
name: Upload Member to GitHub
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
publish-staging:
|
||||
runs-on: docker
|
||||
|
@ -68,13 +49,16 @@ jobs:
|
|||
steps:
|
||||
- name: Git Clone
|
||||
uses: actions/checkout@v4
|
||||
- name: Publish to NPM (staging)
|
||||
run: |
|
||||
cd dist
|
||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
||||
npm publish
|
||||
|
||||
- name: Download EHR
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: dist
|
||||
name: dist
|
||||
|
||||
- run: npm publish --provenance --access public
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
publish-production:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue