-
Notifications
You must be signed in to change notification settings - Fork 55
36 lines (35 loc) · 1.07 KB
/
nightly-release.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
name: Nightly release
on:
schedule:
- cron: '0 15 * * *'
workflow_dispatch:
inputs:
tag-name:
type: string
description: 'Nightly release tag'
required: true
jobs:
create-nightly-tag:
runs-on: ubuntu-20.04
outputs:
tag-name: ${{ steps.generate-tag.outputs.TAG_NAME }}
steps:
- uses: actions/checkout@v4
- name: git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- id: generate-tag
run: |
MANUAL_TAG="${{ inputs.tag-name }}"
echo "TAG_NAME=${MANUAL_TAG:-$(date +'%Y-%m-%d')-a}" >> $GITHUB_OUTPUT
- run: git tag "${{ steps.generate-tag.outputs.TAG_NAME }}"
- run: git push origin "${{ steps.generate-tag.outputs.TAG_NAME }}"
build-and-publish:
needs: [create-nightly-tag]
uses: ./.github/workflows/build.yml
with:
publish: true
prerel_name: ${{ needs.create-nightly-tag.outputs.tag-name }}
secrets:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}