-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Corrección de errores y mejoras en el lanzamiento
- Loading branch information
1 parent
e30dcba
commit c8c32fc
Showing
6 changed files
with
13,228 additions
and
12,824 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: "release" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- "*" | ||
paths: | ||
- "**" | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
create-or-find-release: | ||
if: github.event_name == 'workflow_dispatch' || github.actor == 'semantic-release-bot' | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
release_id: ${{ steps.set-release-id.outputs.release_id }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- name: Get version | ||
run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV | ||
|
||
- name: Find or create release | ||
id: set-release-id | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const version = `v${process.env.PACKAGE_VERSION}`; | ||
const { data: releases } = await github.rest.repos.listReleases({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
let release = releases.find(r => r.tag_name === version); | ||
if (!release) { | ||
const { data } = await github.rest.repos.createRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
tag_name: version, | ||
name: version, | ||
body: '*This release was generated automatically using GitHub Actions.*', | ||
draft: true, | ||
prerelease: false | ||
}); | ||
release = data; | ||
} | ||
console.log(`Release ID: ${release.id}`); | ||
return { release_id: release.id }; | ||
build-tauri: | ||
needs: create-or-find-release | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [windows-latest, macos-latest, ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Print Release Id | ||
run: echo ${{ needs.create-or-find-release.outputs.release_id }} |
Oops, something went wrong.