🌙 Nightly #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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 |