Skip to content

Merge pull request #78 from long-woo/dev #61

Merge pull request #78 from long-woo/dev

Merge pull request #78 from long-woo/dev #61

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno
name: Publish to release
on:
push:
branches: ['master']
paths:
- deno.json
permissions:
contents: read
jobs:
check:
uses: ./.github/workflows/check.yml
release:
runs-on: ubuntu-latest
needs: check
# 发布时需要提供写入权限
permissions:
contents: write
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- name: Setup repo
uses: actions/[email protected]
- name: Setup Deno
uses: denoland/[email protected]
with:
deno-version: v1.x
# 执行编译命令
- name: Run compile mac
run: deno task build:mac
- name: Run compile mac M
run: deno task build:mac-m
- name: Run compile windows
run: deno task build:win
- name: Run compile linux
run: deno task build:linux
# 创建版本文件
- name: 创建版本文件
id: create_version_file
run: |
deno task version
echo "TAG=$(cat ./release/version)" >> $GITHUB_ENV
# 发布到 Release
- name: Publish to Release
id: publish_release
uses: softprops/action-gh-release@v2
env:
TAG: ${{ env.TAG }}
with:
files: ./release/!(version)
name: ${{ env.TAG }}
tag_name: ${{ env.TAG }}
body: |
v ${{ env.TAG }}
draft: false
prerelease: false
# 发布到 JSR
- name: Publish to JSR
id: publish_jsr
run: deno publish