feat: forgejo action #1

Merged
leandro merged 20 commits from development into master 2025-05-26 04:58:21 +00:00
Showing only changes of commit 4b71522ed2 - Show all commits

View file

@ -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