Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/nigthly-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Nightly Release

on:
schedule:
# This runs at 00:00 UTC every day
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
nightly:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
ref: 'main'
persist-credentials: false

- name: 'Setup Node v20'
uses: actions/setup-node@v3
with:
node-version: '20'
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 'Setup git user'
run: |
git config user.name "${{ github.actor }}"
git config user.email "[email protected]"

- name: 'Check for new commits'
id: check
run: |
LAST_COMMIT=$(git rev-parse HEAD)
DAY_BEFORE=$(date -u -d "yesterday" '+%Y-%m-%dT%H:%M:%SZ')
COMMITS=$(git log --since="$DAY_BEFORE" --format="%H" -n 1)
if [[ "$LAST_COMMIT" == "$COMMITS" ]]; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi

- name: 'Prelease'
if: steps.check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
npx lerna version --conventional-commits --conventional-prerelease --preid alpha --yes

npx lerna publish from-git --no-verify-access --no-changelog --yes
48 changes: 0 additions & 48 deletions .github/workflows/release.yml

This file was deleted.