Skip to content

Commit

Permalink
[Test]
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoMasaia committed Jan 19, 2023
1 parent 395f8b3 commit 19c7079
Showing 1 changed file with 6 additions and 54 deletions.
60 changes: 6 additions & 54 deletions .github/workflows/release-tauri.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,7 @@ on:
- release

jobs:
create-release:
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: `TALight-v__VERSION__`,
name: `TALight v__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
publish-tauri:
strategy:
fail-fast: false
matrix:
Expand All @@ -63,24 +31,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ needs.create-release.outputs.release_id }}

publish-release:
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
})
tagName: TALight-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'TALight v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: false
prerelease: false

0 comments on commit 19c7079

Please # to comment.