Skip to content

Commit

Permalink
🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
Linzell committed Mar 18, 2023
1 parent 40df78e commit 86f5d4e
Showing 1 changed file with 56 additions and 11 deletions.
67 changes: 56 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,43 @@
name: "pre-release"
name: 'publish'
on:
push:
branches:
- "master"
jobs:
pre-release:
name: "Pre Release"
create-release:
permissions:
contents: write
runs-on: ubuntu-20.04
outputs:
release_id: ${{ steps.create-release.outputs.result }}
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: get version
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
- name: create release
id: create-release
uses: actions/github-script@v6
with:
script: |
const { data } = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: `app-v${process.env.PACKAGE_VERSION}`,
name: `Desktop Kiro v${process.env.PACKAGE_VERSION}`,
body: 'Take a look at the assets to download and install this app.',
draft: true,
prerelease: false
})
return data.id
build-tauri:
needs: create-release
permissions:
id-token: write
contents: write
packages: write
pull-requests: read
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -38,8 +65,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
releaseId: ${{ needs.create-release.outputs.release_id }}

publish-release:
permissions:
contents: write
runs-on: ubuntu-20.04
needs: [create-release, build-tauri]

steps:
- name: publish release
id: publish-release
uses: actions/github-script@v6
env:
release_id: ${{ needs.create-release.outputs.release_id }}
with:
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.release_id,
draft: false,
prerelease: false
})

1 comment on commit 86f5d4e

@vercel
Copy link

@vercel vercel bot commented on 86f5d4e Mar 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

kiro – ./

kiro-git-master-linzell.vercel.app
kiro-eight.vercel.app
kiro-linzell.vercel.app

Please sign in to comment.