Files
discordeno/.github/workflows/release.yml
dependabot[bot] 283f634fa0 build(deps): bump actions/setup-node from 3 to 4 (#3292)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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>
2023-12-11 18:55:10 +00:00

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@v4
- uses: actions/setup-node@v4
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 }}