This commit is contained in:
Keith Cirkel 2023-02-01 16:22:42 +00:00 коммит произвёл GitHub
Родитель 441bc694fa
Коммит 8b336f195e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 50 добавлений и 6 удалений

56
.github/workflows/publish.yml поставляемый
Просмотреть файл

@ -1,17 +1,21 @@
name: Publish
on:
release:
types: [created]
jobs:
publish-npm:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout the project
uses: actions/checkout@v3
- name: Use Node.js 16.x (LTS)
uses: actions/setup-node@v3
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18
registry-url: https://registry.npmjs.org/
cache: npm
- run: npm ci
@ -19,6 +23,46 @@ jobs:
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm whoami; npm publish --access public
# Provenance beta builds
# Remove when stable
- name: Clone npm
uses: actions/checkout@v3
with:
repository: npm/cli
ref: provenance
path: npm
- name: Link npm
run: |
cd npm
node . link
cd ..
npm version
# Provenance beta builds
# Remove when stable
- run: npm whoami; npm --ignore-scripts publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
publish-github:
name: Publish to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://npm.pkg.github.com
cache: npm
scope: '@github'
- run: npm ci
- run: npm test
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm --ignore-scripts publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}