Merge pull request #739 from ionicprotocol/development #669
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
name: Security/Push - Publish | |
on: | |
push: | |
branches: | |
- main | |
- development | |
paths: | |
- 'packages/security/**' | |
- '.github/workflows/package-security-push-publish.yml' | |
- 'yarn.lock' | |
pull_request: | |
branches: | |
- main | |
- development | |
paths: | |
- 'packages/security/**' | |
- '.github/workflows/package-security-push-publish.yml' | |
- 'yarn.lock' | |
jobs: | |
test-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install `packages` | |
run: yarn install | |
env: | |
YARN_CHECKSUM_BEHAVIOR: update | |
- name: Build `security` | |
run: yarn build:security | |
- name: Lint `security` | |
run: yarn workspace @ionicprotocol/security lint | |
- name: Test `security` | |
run: yarn workspace @ionicprotocol/security test | |
- uses: JS-DevTools/npm-publish@v1 | |
if: github.ref == 'refs/heads/main' | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
tag: ${{env.GITHUB_REF_NAME == 'main' && 'latest' || 'beta'}} | |
access: 'public' | |
package: './packages/security/package.json' |