Skip to content

Commit

Permalink
add CI to release types
Browse files Browse the repository at this point in the history
  • Loading branch information
ottomated committed Oct 23, 2024
1 parent d3891f4 commit f51b1f5
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release @oxc/types

on:
workflow_dispatch:
push:
branches:
- main
paths:
- npm/oxc-types/package.json # Please only commit this file, so we don't need to wait for all the other CI jobs to finish.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Check version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
version_changed: ${{ steps.version.outputs.changed }}
steps:
- uses: taiki-e/checkout-action@v1

- name: Check version changes
uses: EndBug/version-check@v2
id: version
with:
static-checking: localIsNew
file-url: https://unpkg.com/@oxc/types/package.json
file-name: npm/oxc-types/package.json

- name: Set version name
if: steps.version.outputs.changed == 'true'
run: |
echo "Version change found! New version: ${{ steps.version.outputs.version }} (${{ steps.version.outputs.version_type }})"
build:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Release @oxc/types
runs-on: ubuntu-latest
permissions:
id-token: write # for `pnpm publish --provenance`
steps:
- uses: taiki-e/checkout-action@v1

- uses: ./.github/actions/pnpm

- name: Publish
working-directory: npm/oxc-types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --provenance --access public

0 comments on commit f51b1f5

Please sign in to comment.