-
Notifications
You must be signed in to change notification settings - Fork 27
58 lines (46 loc) · 1.59 KB
/
nightly.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 🌙 Nightly
on:
workflow_dispatch:
schedule:
# Run every Monday-Friday
# at 6:00 UTC (6:00 am UTC)
- cron: '00 06 * * 1-5'
jobs:
release:
name: 🚀 Release
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
with:
path: packages/core
- name: Generate Timestamp
id: timestamp
run: echo "timestamp=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Create version
id: set-version
run: echo "version=${{ steps.package-version.outputs.current-version}}-nightly.${{ steps.timestamp.outputs.timestamp }}" >> $GITHUB_OUTPUT
- name: Print version
run: echo "${{steps.set-version.outputs.version}}"
- uses: ./.github/workflows/actions/release-setup
with:
token: ${{ secrets.GITHUB_TOKEN }}
npm-token: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Define version
run: npx nx release version --git-commit=false --git-tag=false --preid=nightly --specifier=${{steps.set-version.outputs.version}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: npx nx run-many -t build --projects=tag:scope:release
- name: Pre-Publish
run: npx nx run pre-publish
- name: Publish
run: npx nx release publish --tag=nightly
- name: Git Reset
run: git reset --hard