Skip to content

ci: try another way to test #24

ci: try another way to test

ci: try another way to test #24

Workflow file for this run

name: Publish Release
on:
push:
tags:
- "**.*"
jobs:
data:
name: Get Data
runs-on: ubuntu-latest
outputs:
data: ${{ steps.step-data.outputs.data }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Get Data
id: step-data
run: echo data=$(node packages/tools/src/tag.mjs ${{ github.ref_name }}) >> $GITHUB_OUTPUT
github-release:
name: Publish GitHub Release
runs-on: ubuntu-latest
needs: data
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Publish Release
uses: leomotors/auto-publish-release@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
title: ${{ fromJson(needs.data.outputs.data).packageTitle }}
tag: ${{ github.ref_name }}
changelog: ${{ fromJson(needs.data.outputs.data).packagePath }}/CHANGELOG.md
npm-release:
name: Publish to npm
runs-on: ubuntu-latest
needs: data
env:
NPM_CONFIG_PROVENANCE: true
permissions:
id-token: write
steps:
- name: actions/checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
- name: Setup node with cache
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install Dependencies
run: pnpm install
- name: Build target package
run: pnpm turbo run --filter=${{ fromJson(needs.data.outputs.data).packageName }} build
- name: Release Package
run: pnpm --filter=${{ fromJson(needs.data.outputs.data).packageName }} publish --no-git-checks --tag ${{ fromJson(needs.data.outputs.data).tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}