chore(deps): update dependency tsup to v8.3.6 (#566) #219
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
IMAGE: ghcr.io/dynamicabot/dynamica-v2 | |
permissions: | |
packages: write | |
id-token: write | |
contents: write | |
pull-requests: write | |
jobs: | |
type-check: | |
uses: ./.github/workflows/typecheck.yml | |
name: Check Types | |
lint: | |
uses: ./.github/workflows/lint.yml | |
name: Lint | |
release: | |
name: Release Changeset | |
runs-on: ubuntu-latest | |
needs: [type-check, lint] | |
outputs: | |
published: ${{ steps.changesets.outputs.published }} | |
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Setup Node.js 21 | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: "pnpm" | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Create Release Pull Request | |
id: changesets | |
uses: changesets/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
# this npm script triggers `changeset publish` | |
publish: pnpm changeset tag | |
createGithubReleases: true | |
publish-docker: | |
name: Publish Docker Images | |
runs-on: ubuntu-latest | |
needs: release | |
if: needs.release.outputs.published == 'true' | |
strategy: | |
fail-fast: true | |
matrix: | |
package: ${{ fromJson(needs.release.outputs.publishedPackages) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Parse Semver | |
uses: booxmedialtd/ws-action-parse-semver@v1.4.7 | |
with: | |
input_string: ${{ matrix.package.version }} | |
id: parse-semver | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.IMAGE }} | |
tags: | | |
# use custom value instead of git tag | |
type=raw,value=latest | |
type=raw,value=${{ matrix.package.version }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}.${{ steps.parse-semver.outputs.patch }} | |
- name: Docker meta (pterodactyl) | |
id: meta-pterodactyl | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.IMAGE }} | |
flavor: | | |
suffix=-pterodactyl,onlatest=true | |
tags: | | |
# use custom value instead of git tag | |
type=raw,value=latest | |
type=raw,value=${{ matrix.package.version }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }} | |
type=raw,value=${{ steps.parse-semver.outputs.major }}.${{ steps.parse-semver.outputs.minor }}.${{ steps.parse-semver.outputs.patch }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Image | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
VERSION=${{ matrix.package.version }} | |
tags: ${{ steps.meta.outputs.tags }} | |
push: true | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=registry,ref=ghcr.io/dynamicabot/dynamica-v2:latest | |
- name: Build Image | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
VERSION=${{ matrix.package.version }} | |
tags: ${{ steps.meta-pterodactyl.outputs.tags }} | |
push: true | |
labels: ${{ steps.meta-pterodactyl.outputs.labels }} | |
target: pterodactyl | |
- name: Extract Dist | |
uses: docker/build-push-action@v6 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
VERSION=${{ matrix.package.version }} | |
tags: ${{ steps.meta.outputs.tags }} | |
target: extract | |
outputs: type=local,dest=dist | |
push: false | |
- uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: "production" | |
sourcemaps: "./dist/linux_amd64/dist" | |
version: ${{ matrix.package.version }} | |
deploy-docs: | |
name: Build and Deploy Docs | |
needs: [release] | |
if: needs.release.outputs.published == 'true' | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
uses: ./.github/workflows/docs.yml |