mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-21 02:40:08 +00:00
* chore: remove client pkg * yarn install * fix: yarn install --------- Co-authored-by: ITOH <to@itoh.at>
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- packages/**
|
|
- .github/**
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
package: ["gateway", "rest", "types", "utils", "bot"]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
registry-url: "https://registry.npmjs.org"
|
|
scope: "@discordeno"
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- run: yarn install --immutable
|
|
- name: Turbo Cache
|
|
id: turbo-cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-release-build-${{ matrix.package }}-${{ github.sha }}
|
|
- name: build Package
|
|
run: yarn release-build --cache-dir=".turbo" --filter=./packages/${{ matrix.package }}
|
|
- name: Bump Package Version
|
|
run: node ./scripts/bumpVersionByCommit.js ${{ matrix.package }}
|
|
|
|
- run: npm publish --access public
|
|
working-directory: packages/${{ matrix.package }}
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|