Skip to content

Merge pull request #276 from hyperdxio/external-contrib-alert-workflow #65

Merge pull request #276 from hyperdxio/external-contrib-alert-workflow

Merge pull request #276 from hyperdxio/external-contrib-alert-workflow #65

Workflow file for this run

name: Release
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
timeout-minutes: 10
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
# Note: Do NOT set registry-url here — it creates a NODE_AUTH_TOKEN
# that conflicts with npm OIDC trusted publishing
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Configure npm registry
run: npm config set registry https://registry.npmjs.org/
- name: Install dependencies
run: yarn
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: yarn run version
publish: yarn run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
# Re-checkout to restore changeset files consumed by the changesets action above.
# Without this, `changeset version --snapshot next` finds no changesets and
# publishes full release versions to the `next` tag instead of snapshots.
- name: Restore checkout for snapshot
if: steps.changesets.outputs.published != 'true' && steps.changesets.outputs.hasChangesets == 'true'
uses: actions/checkout@v4
- name: Install dependencies for snapshot
if: steps.changesets.outputs.published != 'true' && steps.changesets.outputs.hasChangesets == 'true'
run: yarn
- name: Publish snapshot to next tag
if: steps.changesets.outputs.published != 'true' && steps.changesets.outputs.hasChangesets == 'true'
run: yarn run release:next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true