mirror of
https://github.com/nushell/nushell.git
synced 2025-02-16 18:41:44 +01:00
Improve release script for github release workflow (#10502)
# Description Improve release script for Github release workflow: Just some small improvements
This commit is contained in:
parent
b39cca91e5
commit
5326e51e4f
15
.github/workflows/release-pkg.nu
vendored
15
.github/workflows/release-pkg.nu
vendored
@ -63,11 +63,14 @@ const FULL_RLS_NAMING = {
|
|||||||
x86_64-unknown-linux-musl: 'x86_64-linux-musl-full',
|
x86_64-unknown-linux-musl: 'x86_64-linux-musl-full',
|
||||||
aarch64-unknown-linux-gnu: 'aarch64-linux-gnu-full',
|
aarch64-unknown-linux-gnu: 'aarch64-linux-gnu-full',
|
||||||
aarch64-pc-windows-msvc: 'aarch64-windows-msvc-full',
|
aarch64-pc-windows-msvc: 'aarch64-windows-msvc-full',
|
||||||
|
riscv64gc-unknown-linux-gnu: 'riscv64-linux-gnu-full',
|
||||||
|
armv7-unknown-linux-gnueabihf: 'armv7-linux-gnueabihf-full',
|
||||||
}
|
}
|
||||||
|
|
||||||
# $env
|
# $env
|
||||||
|
|
||||||
let USE_UBUNTU = 'ubuntu-20.04'
|
let USE_UBUNTU = 'ubuntu-20.04'
|
||||||
|
let FULL_NAME = $FULL_RLS_NAMING | get -i $target | default 'unknown-target-full'
|
||||||
|
|
||||||
print $'(char nl)Packaging ($bin) v($version) for ($target) in ($src)...'; hr-line -b
|
print $'(char nl)Packaging ($bin) v($version) for ($target) in ($src)...'; hr-line -b
|
||||||
if not ('Cargo.lock' | path exists) { cargo generate-lockfile }
|
if not ('Cargo.lock' | path exists) { cargo generate-lockfile }
|
||||||
@ -153,11 +156,7 @@ cd $dist; print $'(char nl)Creating release archive...'; hr-line
|
|||||||
if $os in [$USE_UBUNTU, 'macos-latest'] {
|
if $os in [$USE_UBUNTU, 'macos-latest'] {
|
||||||
|
|
||||||
let files = (ls | get name)
|
let files = (ls | get name)
|
||||||
let dest = (
|
let dest = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' }
|
||||||
if $env.RELEASE_TYPE == 'full' {
|
|
||||||
$'($bin)-($version)-($FULL_RLS_NAMING | get $target)'
|
|
||||||
} else { $'($bin)-($version)-($target)' }
|
|
||||||
)
|
|
||||||
let archive = $'($dist)/($dest).tar.gz'
|
let archive = $'($dist)/($dest).tar.gz'
|
||||||
|
|
||||||
mkdir $dest
|
mkdir $dest
|
||||||
@ -172,11 +171,7 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
|
|||||||
|
|
||||||
} else if $os == 'windows-latest' {
|
} else if $os == 'windows-latest' {
|
||||||
|
|
||||||
let releaseStem = (
|
let releaseStem = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' }
|
||||||
if $env.RELEASE_TYPE == 'full' {
|
|
||||||
$'($bin)-($version)-($FULL_RLS_NAMING | get $target)'
|
|
||||||
} else { $'($bin)-($version)-($target)' }
|
|
||||||
)
|
|
||||||
|
|
||||||
print $'(char nl)Download less related stuffs...'; hr-line
|
print $'(char nl)Download less related stuffs...'; hr-line
|
||||||
aria2c https://github.com/jftuga/less-Windows/releases/download/less-v608/less.exe -o less.exe
|
aria2c https://github.com/jftuga/less-Windows/releases/download/less-v608/less.exe -o less.exe
|
||||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -104,6 +104,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v0.1.15
|
uses: softprops/action-gh-release@v0.1.15
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
with:
|
with:
|
||||||
|
draft: true
|
||||||
files: ${{ steps.nu.outputs.archive }}
|
files: ${{ steps.nu.outputs.archive }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user