Repository navigation
Expand file tree
/
Copy pathrelease-create-github-releases.yml
More file actions
86 lines (79 loc) · 2.57 KB
/
Copy pathrelease-create-github-releases.yml
File metadata and controls
86 lines (79 loc) · 2.57 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: 'Release: Create GitHub Releases'
run-name: 'Creating GitHub Releases for ${{ inputs.version-tag }} (${{ inputs.track }})'
on:
workflow_call:
inputs:
track:
required: true
type: string
version-tag:
required: true
type: string
body:
required: true
type: string
commit:
required: true
type: string
is_experimental:
required: true
type: boolean
workflow_dispatch:
inputs:
track:
description: 'Release Track'
required: true
type: choice
options: [stable, beta, v1]
version-tag:
description: 'Version tag (e.g. n8n@2.7.0).'
required: true
type: string
body:
description: 'Release notes body.'
required: true
type: string
commit:
description: 'Commitish the release points to (e.g. branch name or SHA).'
required: true
type: string
is_experimental:
required: true
type: boolean
permissions: {}
jobs:
create-github-releases:
permissions:
contents: write
id-token: write
name: Create GitHub releases
runs-on: ubuntu-slim
environment: release
steps:
- name: Generate GitHub App Token
id: generate_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.N8N_ASSISTANT_APP_ID }}
private-key: ${{ secrets.N8N_ASSISTANT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 1
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
with:
build-command: ''
install-command: pnpm install --frozen-lockfile --dir ./.github/scripts --lockfile-dir ${{ github.workspace }}/.github/scripts --ignore-workspace
cache-dependency-path: .github/scripts/pnpm-lock.yaml
- name: Create GitHub releases
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
RELEASE_TAG: ${{ inputs.version-tag }}
BODY: ${{ inputs.body }}
IS_PRE_RELEASE: ${{ inputs.track == 'beta' || inputs.is_experimental }}
MAKE_LATEST: ${{ inputs.track == 'stable' && !inputs.is_experimental }}
COMMIT: ${{ inputs.commit }}
ADDITIONAL_TAGS: ${{ !inputs.is_experimental && inputs.track || '' }}
run: node ./.github/scripts/create-github-release.mjs