-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (39 loc) · 1.09 KB
/
push_branch-main_release.yml
File metadata and controls
46 lines (39 loc) · 1.09 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
name: DevSecOps - Release on push
on:
push:
branches:
- main
- master
- next
- next-major
- beta
- alpha
- '[0-9]+.[0-9]+.x'
- '[0-9]+.x'
env:
node-js-version: 22.x
author-name: Marc Scheib
author-email: marc.scheib@cycrilabs.com
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
steps:
- name: Checkout [${{ github.head_ref || github.ref_name }}]
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js [${{ env.node-js-version }}]
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-js-version }}
- name: Install dependencies
run: npm ci
- name: Release
run: npx --yes -p @semantic-release/changelog -p @semantic-release/git semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ env.author-name }}
GIT_AUTHOR_EMAIL: ${{ env.author-email }}