Files
discordeno/.github/workflows/release.yml
dependabot[bot] ff7c51de0a build(deps): bump actions/checkout from 4 to 5 (#4408)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  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>
Co-authored-by: Fleny <Fleny113@outlook.com>
2025-09-02 09:35:36 +02: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@v5
- uses: actions/setup-node@v4
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 }}