-
Notifications
You must be signed in to change notification settings - Fork 930
ci: update release script & add nightly releases #2440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1064380
ci: update release script & add nightly releases
szymonrybczak 1e5fc01
ci: remove `release.yml`
szymonrybczak 68e5eb7
fix: adapt command for CI usage
szymonrybczak 2dbe50c
Update .github/workflows/nigthly-release.yml
szymonrybczak bc4e259
feat: add logic for creating proper versions
szymonrybczak 37b33cc
fix: correctly order command option
szymonrybczak 8ddd0cf
fix: properly provide dist-tag
szymonrybczak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| 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]" | ||
szymonrybczak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - 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: | | ||
| yarn run publish:next | ||
szymonrybczak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,42 @@ | ||
| name: Release | ||
|
|
||
| # Temporarily disable until issues resolved | ||
| on: | ||
| # release: | ||
| # types: [published] | ||
| release: | ||
| types: [published] | ||
szymonrybczak marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: "Checkout" | ||
| - name: 'Checkout' | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: "main" | ||
| ref: 'main' | ||
| persist-credentials: false | ||
|
|
||
| - name: "Setup Node v16" | ||
| - name: 'Setup Node v20' | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '16' | ||
| 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: "Prelease" | ||
| if: "github.event.release.prerelease" | ||
| - name: 'Prelease' | ||
| if: 'github.event.release.prerelease' | ||
| 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 | ||
| - name: "Release" | ||
| if: "!github.event.release.prerelease" | ||
| - name: 'Release' | ||
| if: '!github.event.release.prerelease' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| npx lerna version --conventional-commits --yes | ||
| npx lerna publish from-git --no-verify-access --no-changelog --yes | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.