Publish Dev #1049
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: Publish Dev | |
on: | |
schedule: | |
- cron: '0 18 * * *' | |
workflow_dispatch: | |
jobs: | |
npm-publish: | |
name: npm publish | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- package: '@conductr/core' | |
folder: 'core' | |
runs-on: ubuntu-latest | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install node.js v20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
with: | |
run_install: true | |
# - name: Get pnpm store directory | |
# id: pnpm-cache | |
# shell: bash | |
# run: | | |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
# - uses: actions/cache@v3 | |
# name: Setup pnpm cache | |
# with: | |
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm-store- | |
# - name: Install dependencies | |
# run: pnpm install | |
- name: Build dependencies | |
run: pnpm build | |
- name: Configure git | |
run: | | |
git config --global user.name "Conductr Publish Dev" | |
git config --global user.email "${{ secrets.COMMIT_USER_EMAIL }}" | |
- name: Publish package | |
run: | | |
pnpm -F ${{ matrix.package }} release --preid "dev.$(date +%s)-$(git rev-parse --short HEAD)" | |
pnpm -F ${{ matrix.package }} npm publish --tag dev || true | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |