Skip to content

Release intl ecosystem #53

Release intl ecosystem

Release intl ecosystem #53

Workflow file for this run

name: Release intl ecosystem
on:
workflow_dispatch:
inputs:
commit:
required: true
type: string
description: 'Commit SHA'
publish:
required: true
type: boolean
description: "Publish to NPM?"
fail-fast:
required: false
type: boolean
default: false
description: 'Fail fast?'
permissions:
# To publish packages with provenance
contents: write
id-token: write
jobs:
build-db:
name: Build intl-message-database
strategy:
fail-fast: ${{inputs.fail-fast}}
matrix:
target:
# Linux
- ['ubuntu-latest', 'linux-x64-gnu']
- ['ubuntu-latest', 'linux-arm64-gnu']
- ['ubuntu-latest', 'linux-x64-musl']
- ['ubuntu-latest', 'linux-arm64-musl']
# Windows
- ['windows-latest', 'win32-ia32-msvc']
- ['windows-latest', 'win32-x64-msvc']
- ['windows-latest', 'win32-arm64-msvc']
# macOS
- ['macos-latest', 'darwin-x64']
- ['macos-latest', 'darwin-arm64']
uses: ./.github/workflows/build-intl-message-database.yaml
with:
# Using napi and cargo-zigbuild/cargo-xwin, everything _should_ be buildable on ubuntu directly.
runner: ${{ matrix.target[0] }}
target: ${{ matrix.target[1] }}
ref: ${{inputs.commit}}
secrets: inherit
build-swc:
name: Build @discord/swc-intl-message-transformer
uses: ./.github/workflows/build-swc-intl-message-transformer.yaml
with:
ref: ${{inputs.commit}}
release:
name: Release and Publish
needs:
- build-db
- build-swc
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
if: inputs.publish
steps:
- uses: actions/checkout@v4
- name: Setup Build Env
uses: ./.github/actions/setup-build-env
with:
native: false
ref: ${{ inputs.ref }}
target: any
- name: Download package artifacts
uses: actions/download-artifact@v4
with:
path: ~/artifacts
merge-multiple: true
- name: Move build artifacts into packages
run: |
pnpm intl-cli util move-gh-artifacts ~/artifacts
- name: Check package versions
run: |
pnpm intl-cli ecosystem version-check
- name: Publish all @discord/intl-message-database* packages
run: |
pnpm intl-cli ecosystem publish-all --provenance --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}