Skip to content

Commit 63c4aa5

Browse files
authored
Merge pull request #374 from modelix/ci/nightly-release
MODELIX-655 Convert release to nightly
2 parents 0a374ca + 976060d commit 63c4aa5

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed
Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
name: Release
1+
name: Dry-Run Release
22
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request: {}
3+
pull_request:
74

85
jobs:
96
lint-commits:
107
name: Lint PR commits
118
runs-on: ubuntu-latest
12-
if: ${{ github.event_name == 'pull_request' }}
139
steps:
1410
- uses: actions/checkout@v3
1511
with:
@@ -19,7 +15,6 @@ jobs:
1915
test-release:
2016
name: Dry-run semantic-release
2117
runs-on: ubuntu-latest
22-
if: ${{ github.event_name == 'pull_request' }}
2318
steps:
2419
- name: Checkout
2520
uses: actions/checkout@v3
@@ -48,29 +43,3 @@ jobs:
4843
# configuration from the CI environment by removing the variable that
4944
# is used for CI detection.
5045
run: unset GITHUB_ACTIONS && npx semantic-release --dry-run --ci false
51-
52-
release:
53-
name: Run semantic release
54-
runs-on: ubuntu-latest
55-
if: ${{ github.ref == 'refs/heads/main' }}
56-
steps:
57-
- name: Checkout
58-
uses: actions/checkout@v3
59-
with:
60-
fetch-depth: 0
61-
token: ${{ secrets.RELEASE_TOKEN }}
62-
- name: Setup Node.js
63-
uses: actions/setup-node@v3
64-
with:
65-
node-version: 18
66-
- name: Cache Node packages
67-
uses: actions/cache@v3
68-
with:
69-
path: node_modules
70-
key: release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
71-
- name: Install dependencies
72-
run: npm ci
73-
- name: Release
74-
env:
75-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
76-
run: npx semantic-release

.github/workflows/release.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 2 * * *' # run at 2 AM UTC
6+
7+
jobs:
8+
release:
9+
name: Run semantic release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
token: ${{ secrets.RELEASE_TOKEN }}
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 18
21+
- name: Cache Node packages
22+
uses: actions/cache@v3
23+
with:
24+
path: node_modules
25+
key: release-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
31+
run: npx semantic-release

0 commit comments

Comments
 (0)