Files
discordeno/.github/workflows/release.yml
T
FlenyandAwesome Stickz 580e5d3f56 ci: Use node v22 (#5167)
In package.json, the reason for >= 22.15 is that thats the node:zlib's zstd minimum version

Co-authored-by: Awesome Stickz <38146668+AwesomeStickz@users.noreply.github.com>
2026-07-22 19:43:22 +05:30

42 lines
1.3 KiB
YAML

name: Release
permissions:
contents: read
packages: write
id-token: write
on:
push:
branches:
- main
paths:
- packages/**
- .github/**
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ['gateway', 'rest', 'types', 'utils', 'bot', 'discordeno']
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: yarn
registry-url: 'https://registry.npmjs.org'
scope: '@discordeno'
- run: yarn install --immutable
- name: build Package
run: yarn release-build --filter=./packages/${{ matrix.package }}
- name: Bump Package Version
if: ${{ github.event_name != 'release' && github.event.action != 'published' }}
run: node ./scripts/bumpVersionByCommit.js ${{ matrix.package }}
# If the action is running from a release, if prerelease use beta tag else use latest tag, otherwise use the next tag
- run: yarn npm publish --tag ${{ github.event_name == 'release' && github.event.action == 'published' && (github.event.release.prerelease && 'beta' || 'latest') || 'next' }} --access public --provenance
working-directory: packages/${{ matrix.package }}