mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 16:00:07 +00:00
* Update yarn, refactor packages setup * Rename some jobs in lib-check.yml * Update website/yarn.lock * Revert build-type-and-test job name change
48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- packages/**
|
|
- .github/**
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
id-token: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
package: ['gateway', 'rest', 'types', 'utils', 'bot', 'discordeno']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
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 use the latest tag, otherwise use the next tag
|
|
- run: npm publish package.tgz --tag ${{ github.event_name == 'release' && github.event.action == 'published' && 'latest' || 'next' }} --access public --provenance
|
|
working-directory: packages/${{ matrix.package }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|