-
-
Notifications
You must be signed in to change notification settings - Fork 356
51 lines (47 loc) · 1.62 KB
/
Copy pathpublish.yml
File metadata and controls
51 lines (47 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Publish and release (latest)
on:
workflow_dispatch:
repository_dispatch:
types:
- release-triggered
env:
GIT_COMMIT: ${{ github.sha }}
GIT_REF: ${{ github.ref }}
LOG_LEVEL: info
PACT_BROKER_BASE_URL: ${{ secrets.PACT_BROKER_BASE_URL }}
PACT_BROKER_TOKEN: ${{ secrets.PACT_BROKER_TOKEN }}
# Setup npm trusted publishing
permissions:
id-token: write
contents: write
jobs:
release:
runs-on: ubuntu-latest
outputs:
version: v${{ steps.publish.outputs.version }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: master
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
- id: publish
run: scripts/ci/release.sh
env:
SKIP_EXAMPLES: true
# examples are skipped, due to jest-pact requiring updating to support pact-js-v16
# will be reinstated, post release of https://github.com/pact-foundation/jest-pact/pull/423
- name: Create Release
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ steps.publish.outputs.version }}
release_name: Release v${{ steps.publish.outputs.version }}
body: ${{steps.publish.outputs.notes}}
draft: false
prerelease: false