Files
discordeno/.github/workflows/release.yml
dependabot[bot] 33e24c8c07 build(deps): bump actions/checkout from 5 to 6 (#4595)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 13:30:43 +01:00

47 lines
1.5 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@v6
- uses: actions/setup-node@v6
with:
node-version: 20
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 }}
- run: yarn pack
working-directory: packages/${{ 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: npm publish package.tgz --tag ${{ github.event_name == 'release' && github.event.action == 'published' && (github.event.release.prerelease && 'beta' || 'latest') || 'next' }} --access public --provenance
working-directory: packages/${{ matrix.package }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}