Skip to content

Publish to deno.land/x #31

Publish to deno.land/x

Publish to deno.land/x #31

Workflow file for this run

name: Publish to deno.land/x
on:
workflow_dispatch:
inputs:
version:
description: "Version to publish"
required: true
type: "string"
defaults:
run:
working-directory: .
jobs:
publish-deno:
runs-on: ubuntu-latest
name: "Publish to deno.land/x"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Set Node version to 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Install
run: pnpm install
- name: Build some packages
run: pnpm -r --filter=@hattip/graphql --filter=@hattip/compose build
- name: Checkout the Deno release repo
uses: actions/checkout@v4
with:
repository: hattipjs/deno-release
path: _deno
- name: Build Deno sources
working-directory: deno-build
run: pnpm start
- name: Typecheck
working-directory: _deno
run: "deno check `find src ! -wholename 'src/adapter-fastly/mod.ts' ! -wholename 'src/adapter-cloudflare-workers/*' -name '*.ts'`"
- name: "Commit changes if any"
working-directory: _deno
run: |
git config --global user.name "Hattip Deno Release Bot"
git config --global user.email "<>"
git add .
git commit -m "sync with hattipjs/hattip ${{ github.sha }}" --allow-empty
git tag v${{ github.event.inputs.version }}
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ secrets.GIT_PUSH_KEY }}"
ssh-add -l
git remote set-url origin [email protected]:hattipjs/deno-release.git
git push
git push --tags