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:
|
steps:
|
||||||
- name: Git Clone
|
- name: Git Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Restore Node Modules Cache
|
- name: Restore Node Modules Cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -33,31 +34,11 @@ jobs:
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|
||||||
- name: Save dist/ for later steps
|
- uses: actions/upload-artifact@v4
|
||||||
run: |
|
name: Upload Member to GitHub
|
||||||
mkdir -p /tmp/artifacts
|
with:
|
||||||
cp -r dist /tmp/artifacts
|
name: dist
|
||||||
|
path: dist
|
||||||
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
|
|
||||||
|
|
||||||
publish-staging:
|
publish-staging:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
@ -68,13 +49,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Git Clone
|
- name: Git Clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Publish to NPM (staging)
|
|
||||||
run: |
|
- name: Download EHR
|
||||||
cd dist
|
uses: actions/download-artifact@v4
|
||||||
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
|
with:
|
||||||
npm publish
|
path: dist
|
||||||
|
name: dist
|
||||||
|
|
||||||
|
- run: npm publish --provenance --access public
|
||||||
env:
|
env:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
publish-production:
|
publish-production:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue