Update release.yaml
This commit is contained in:
parent
b83d6269e0
commit
fb7c06ccc2
32
.github/workflows/release.yaml
vendored
32
.github/workflows/release.yaml
vendored
@ -2,10 +2,6 @@ name: Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
|
||||||
version:
|
|
||||||
description: 'Version number'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create_release:
|
create_release:
|
||||||
@ -14,6 +10,22 @@ jobs:
|
|||||||
- name: Checkout repository code
|
- name: Checkout repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: CargoVersionBump
|
||||||
|
# You may pin to the exact commit or the version.
|
||||||
|
# uses: bp3d-actions/cargo-version@c67ad4bfe18e7bd64ef90277fa4f86ae3fcaec3e
|
||||||
|
uses: bp3d-actions/cargo-version@0.0.2
|
||||||
|
with:
|
||||||
|
# get to return current crate name and version, set to check and apply the new provided version if it is greater than the current one
|
||||||
|
mode: get
|
||||||
|
# name of the release branch
|
||||||
|
release-branch: master
|
||||||
|
# set to true if the repository has multiple Cargo crates, in which case multiple /version can be used, each with the directory name as second argument
|
||||||
|
multi: false
|
||||||
|
# the GitHub Actions token
|
||||||
|
token: ${{ secrets.DAMIEN_TOKEN }}
|
||||||
|
# working directory of Cargo.toml
|
||||||
|
cwd: ./src-tauri/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
@ -85,12 +97,14 @@ jobs:
|
|||||||
- name: Install node dependencies
|
- name: Install node dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Set crate version
|
|
||||||
|
- name: Rust Crate Version
|
||||||
# You may pin to the exact commit or the version.
|
# You may pin to the exact commit or the version.
|
||||||
# uses: thomaseizinger/set-crate-version@0941739e872e465c18af1148eccf85b249b82016
|
# uses: colt-1/crate-version@f0081b509cc5c928cf4e807219479a481f969341
|
||||||
uses: thomaseizinger/set-crate-version@1.0.0
|
uses: colt-1/crate-version@2.0.0
|
||||||
with:
|
with:
|
||||||
version: ${{ github.event.inputs.version}}
|
# The relative path of toml file
|
||||||
|
file: ./src-tauri/Cargo.toml
|
||||||
|
|
||||||
- name: Build application
|
- name: Build application
|
||||||
run: npm run tauri build
|
run: npm run tauri build
|
||||||
@ -106,5 +120,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
asset_path: ./release_${{ matrix.os }}.zip
|
asset_path: ./release_${{ matrix.os }}.zip
|
||||||
asset_name: file_tree_${{ github.event.inputs.version }}_${{ matrix.os }}.zip
|
asset_name: file_tree_${{ steps.crate-version.outputs.version }}_${{ matrix.os }}.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user