mirror of
https://github.com/Turfjs/turf.git
synced 2026-01-25 16:07:00 +00:00
* Added id-token permission to allow for migration to npm trusted publishing. Updating node versions to reflect support matrix. * Renamed turf.yml more descriptively to ci.yml
60 lines
1.4 KiB
YAML
60 lines
1.4 KiB
YAML
name: Publish release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
node:
|
|
- 20
|
|
platform:
|
|
- ubuntu-latest
|
|
name: "${{matrix.platform}} / Node.js ${{ matrix.node }}"
|
|
runs-on: ${{matrix.platform}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # 4.1.0
|
|
with:
|
|
run_install: false
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # 4.3.0
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
registry-url: "https://registry.npmjs.org"
|
|
cache: "pnpm"
|
|
|
|
- run: npm whoami
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- run: pnpm test
|
|
|
|
- name: run publish
|
|
run: lerna publish from-package --ignore-scripts true --yes
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- name: Create Github Release
|
|
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # 2.2.1
|
|
with:
|
|
make_latest: true
|
|
generate_release_notes: true
|
|
draft: true
|