development #7

Merged
leandro merged 13 commits from development into master 2025-05-30 15:48:18 +00:00
Showing only changes of commit 0b482f85d8 - Show all commits

View file

@ -73,12 +73,12 @@ jobs:
echo "version_changed=false" >> "$GITHUB_OUTPUT"
fi
publish-staging:
publish-to-npm:
runs-on: docker
needs: [mirror]
container:
image: node:20-alpine
if: needs.check-version.outputs.version_changed == 'true' && (github.ref == 'refs/heads/development' || startsWith(github.ref, 'refs/heads/release-no-verify/'))
if: needs.check-version.outputs.version_changed == 'true' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master')
steps:
- name: Download lhmask
uses: actions/download-artifact@v3
@ -86,6 +86,10 @@ jobs:
path: lhmask
name: lhmask
- name: Ajusta nome do pacote
if: github.ref == 'refs/heads/master'
run: sed -i "s/-dev//g" lhmask/package.json
- name: Publish to NPM (staging)
run: |
cd lhmask
@ -93,45 +97,24 @@ jobs:
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-production:
runs-on: docker
needs: [mirror]
container:
image: node:20-alpine
if: needs.check-version.outputs.version_changed == 'true' && github.ref == 'refs/heads/master'
steps:
- name: Download lhmask
uses: actions/download-artifact@v3
with:
path: lhmask
name: lhmask
- name: Publish to NPM (staging)
run: |
cd lhmask
sed -i "s/-dev//g" package.json
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-git:
publish-to-git:
runs-on: docker
container:
image: node:20-alpine
needs: [build-and-test]
if: needs.check-version.outputs.version_changed == 'true'
if: needs.check-version.outputs.version_changed == 'true' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master')
steps:
- name: Download lhmask
uses: actions/download-artifact@v3
with:
path: lhmask
name: lhmask
- name: Ajusta nome do pacote
if: github.ref == 'refs/heads/master'
run: |
cd lhmask
sed -i "s/-dev//g" package.json
run: sed -i "s/-dev//g" lhmask/package.json
- name: Publish to Git
run: |
npm config set registry https://git.lhprovedor.com.br/api/packages/leandro/npm/
@ -143,11 +126,8 @@ jobs:
finish:
runs-on: docker
needs: [publish-staging, publish-production, publish-git, build-and-test]
needs: [build-and-test, publish-to-npm, publish-to-git]
container:
image: node:20-alpine
steps:
- name: Finish task
run: echo Done
- name: Publish to Git
run: npm publish
- run: echo Done