-
Notifications
You must be signed in to change notification settings - Fork 7
41 lines (39 loc) · 1.13 KB
/
deployment.yml
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
name: Deployment
on:
push:
branches: [master]
jobs:
deployment:
name: Release new version
if: github.repository_owner == 'klarna-incubator'
runs-on: ubuntu-latest
environment: Deploy
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Publish to NPM
id: publish
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
access: public
provenance: true
- name: Create release
if: steps.publish.outputs.type
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.publish.outputs.version }}
release_name: ${{ steps.publish.outputs.version }}
body: ${{ steps.publish.outputs.version }}
draft: true
prerelease: false