mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +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',
|
||||
aarch64-unknown-linux-gnu: 'aarch64-linux-gnu-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
|
||||
|
||||
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
|
||||
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'] {
|
||||
|
||||
let files = (ls | get name)
|
||||
let dest = (
|
||||
if $env.RELEASE_TYPE == 'full' {
|
||||
$'($bin)-($version)-($FULL_RLS_NAMING | get $target)'
|
||||
} else { $'($bin)-($version)-($target)' }
|
||||
)
|
||||
let dest = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' }
|
||||
let archive = $'($dist)/($dest).tar.gz'
|
||||
|
||||
mkdir $dest
|
||||
@ -172,11 +171,7 @@ if $os in [$USE_UBUNTU, 'macos-latest'] {
|
||||
|
||||
} else if $os == 'windows-latest' {
|
||||
|
||||
let releaseStem = (
|
||||
if $env.RELEASE_TYPE == 'full' {
|
||||
$'($bin)-($version)-($FULL_RLS_NAMING | get $target)'
|
||||
} else { $'($bin)-($version)-($target)' }
|
||||
)
|
||||
let releaseStem = if $env.RELEASE_TYPE == 'full' { $'($bin)-($version)-($FULL_NAME)' } else { $'($bin)-($version)-($target)' }
|
||||
|
||||
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
|
||||
|
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
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
with:
|
||||
draft: true
|
||||
files: ${{ steps.nu.outputs.archive }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user