feat: config improvment (#47) #32
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 | |
permissions: | |
contents: write | |
pull-requests: write | |
env: | |
DENO_DIR: ~/.deno-cache | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
deno-version: [2.1.1] | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.GH_RUNREAL_TOKEN }} | |
pull-request-title-pattern: "chore${scope}: release${component} ${version}" | |
release-type: simple | |
draft: true | |
extra-files: | | |
README.md | |
src/version.ts | |
- uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: Setup Deno ${{ matrix.deno-version }} | |
if: ${{ steps.release.outputs.release_created }} | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.deno-version }} | |
- name: Deno Compile [windows] | |
if: ${{ steps.release.outputs.release_created }} | |
run: deno task compile-win | |
- name: Deno Compile [macos] | |
if: ${{ steps.release.outputs.release_created }} | |
run: deno task compile-macos | |
- name: Deno Compile [linux] | |
if: ${{ steps.release.outputs.release_created }} | |
run: deno task compile-linux | |
- name: Upload Artifacts | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ steps.release.outputs.tag_name }} ./build/runreal-win-x64.exe ./build/runreal-macos-arm ./build/runreal-linux-x64 schema.json | |
- name: Cache Deno dependencies | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.DENO_DIR }} | |
key: ${{ hashFiles('deno.lock') }} |