Skip to content

Commit

Permalink
add nightly release channel
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed Oct 8, 2023
1 parent e03c42e commit b368f24
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Nightly Release

# on every commit to main, we want to publish a snapshot release:
# for more info: https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md
on:
push:
branches:
- main

env:
CI: true
jobs:
publish:
name: Publish Nightly Version
runs-on: ubuntu-22.04
steps:
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
email=$NPM_EMAIL
name=$NPM_NAME
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_NAME: ${{ secrets.NPM_NAME }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Checkout source
uses: actions/checkout@master
with:
ref: ${{ github.ref }}

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16.17.0

- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 7

- name: Install dependencies
run: pnpm install

- name: Set Git Identity
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Apply and publish the snapshot release
run: |
pnpm changeset version --snapshot
pnpm run build
pnpm changeset publish --no-git-tag --snapshot --tag nightly

0 comments on commit b368f24

Please sign in to comment.