ci: avoid double zip; use tar instead to preserve x on linux/mac
This commit is contained in:
parent
863983f0ff
commit
827d3f79f4
@ -41,10 +41,13 @@ jobs:
|
|||||||
docker cp $container_id:/root/hledger tmp
|
docker cp $container_id:/root/hledger tmp
|
||||||
docker rm -v $container_id
|
docker rm -v $container_id
|
||||||
cd tmp
|
cd tmp
|
||||||
zip hledger-linux-static-arm32v7.zip hledger hledger-ui hledger-web
|
tar cvf hledger-linux-static-arm32v7.tar hledger hledger-ui hledger-web
|
||||||
|
|
||||||
|
# upload-artifact loses execute permissions, so we tar the binaries to preserve them.
|
||||||
|
# github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar.
|
||||||
|
# Unfortunately it means users must both unzip and untar.
|
||||||
- name: Upload binaries artifact
|
- name: Upload binaries artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: hledger-linux-static-arm32v7
|
name: hledger-linux-static-arm32v7
|
||||||
path: tmp/hledger-linux-static-arm32v7.zip
|
path: tmp/hledger-linux-static-arm32v7.tar
|
||||||
|
|||||||
@ -64,10 +64,13 @@ jobs:
|
|||||||
strip hledger
|
strip hledger
|
||||||
strip hledger-ui
|
strip hledger-ui
|
||||||
strip hledger-web
|
strip hledger-web
|
||||||
zip hledger-linux-x64.zip hledger hledger-ui hledger-web
|
tar cvf hledger-linux-x64.tar hledger hledger-ui hledger-web
|
||||||
|
|
||||||
|
# upload-artifact loses execute permissions, so we tar the binaries to preserve them.
|
||||||
|
# github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar.
|
||||||
|
# Unfortunately it means users must both unzip and untar.
|
||||||
- name: Upload binaries
|
- name: Upload binaries
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: hledger-linux-x64
|
name: hledger-linux-x64
|
||||||
path: tmp/hledger-linux-x64.zip
|
path: tmp/hledger-linux-x64.tar
|
||||||
|
|||||||
8
.github/workflows/binaries-mac-x64.yml
vendored
8
.github/workflows/binaries-mac-x64.yml
vendored
@ -169,14 +169,16 @@ jobs:
|
|||||||
strip hledger
|
strip hledger
|
||||||
strip hledger-ui
|
strip hledger-ui
|
||||||
strip hledger-web
|
strip hledger-web
|
||||||
zip hledger-mac-x64.zip hledger hledger-ui hledger-web
|
tar cvf hledger-mac-x64.tar hledger hledger-ui hledger-web
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
# upload-artifact loses execute permissions, so we tar the binaries to preserve them.
|
||||||
|
# github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar.
|
||||||
|
# Unfortunately it means users must both unzip and untar.
|
||||||
- name: Upload binaries artifact
|
- name: Upload binaries artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: hledger-mac-x64
|
name: hledger-mac-x64
|
||||||
path: tmp/hledger-mac-x64.zip
|
path: tmp/hledger-mac-x64.tar
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/binaries-windows-x64.yml
vendored
6
.github/workflows/binaries-windows-x64.yml
vendored
@ -170,13 +170,13 @@ jobs:
|
|||||||
cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-web.exe .
|
cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-web.exe .
|
||||||
strip hledger.exe
|
strip hledger.exe
|
||||||
strip hledger-web.exe
|
strip hledger-web.exe
|
||||||
zip hledger-windows-x64.zip hledger.exe hledger-web.exe
|
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
|
||||||
- name: Create binaries artifact
|
- name: Create binaries artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: hledger-windows-x64
|
name: hledger-windows-x64
|
||||||
path: tmp/hledger-windows-x64.zip
|
path: |
|
||||||
|
tmp/hledger.exe
|
||||||
|
tmp/hledger-web.exe
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|||||||
8
.github/workflows/test-linux-x64.yml
vendored
8
.github/workflows/test-linux-x64.yml
vendored
@ -274,18 +274,20 @@ jobs:
|
|||||||
strip hledger
|
strip hledger
|
||||||
strip hledger-ui
|
strip hledger-ui
|
||||||
strip hledger-web
|
strip hledger-web
|
||||||
zip hledger-linux-x64.zip hledger hledger-ui hledger-web
|
tar cvf hledger-linux-x64.tar hledger hledger-ui hledger-web
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|
||||||
# how to set a context variable, and an attempt to make a nice artifact version suffix:
|
# how to set a context variable, and an attempt to make a nice artifact version suffix:
|
||||||
# echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)"
|
# echo "::set-output name=version::$(git branch --show-current | sed 's/-.*//')-$(git rev-parse --short HEAD)"
|
||||||
|
|
||||||
# XXX intermittent upload failures
|
# upload-artifact loses execute permissions, so we tar the binaries to preserve them.
|
||||||
|
# github UI always zips artifacts when they are downloaded, so we don't bother compressing the tar.
|
||||||
|
# Unfortunately it means users must both unzip and untar.
|
||||||
- name: Upload binaries artifact
|
- name: Upload binaries artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: hledger-linux-x64
|
name: hledger-linux-x64
|
||||||
path: tmp/hledger-linux-x64.zip
|
path: tmp/hledger-linux-x64.tar
|
||||||
if: env.CONTINUE
|
if: env.CONTINUE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Or, if there are release binaries below suitable for your OS and hardware, you c
|
|||||||
- YYYY-MM-DD: description. [#NNNN](https://github.com/simonmichael/hledger/issues/NNNN)
|
- YYYY-MM-DD: description. [#NNNN](https://github.com/simonmichael/hledger/issues/NNNN)
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Here are some instructions for the release binaries on various platforms:
|
Here are some instructions for the release binaries on various platforms. (You can copy & paste each block of commands as a unit, to save time.):
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
@ -39,12 +39,12 @@ Here are some instructions for the release binaries on various platforms:
|
|||||||
At the command line,
|
At the command line,
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd /usr/local/bin
|
cd /usr/local/bin
|
||||||
$ curl -LOC- https://github.com/simonmichael/hledger/releases/download/A.BB/hledger-linux-x64.zip # can rerun this if interrupted
|
curl -LOC- https://github.com/simonmichael/hledger/releases/download/A.BB/hledger-linux-x64.zip # can rerun this if interrupted
|
||||||
$ unzip -X hledger-linux-x64.zip
|
unzip hledger-linux-x64.zip; tar xvf hledger-linux-x64.tar; rm hledger-linux-x64.{zip,tar} # github workaround, preserves permissions
|
||||||
$ cd -
|
cd -
|
||||||
$ hledger --version # should show the new version
|
hledger --version # should show the new version
|
||||||
$ touch $HOME/.hledger.journal # ensure a default journal file exists
|
touch $HOME/.hledger.journal # ensure a default journal file exists
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -56,14 +56,14 @@ $ touch $HOME/.hledger.journal # ensure a default journal file exists
|
|||||||
In a terminal window,
|
In a terminal window,
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd /usr/local/bin
|
cd /usr/local/bin
|
||||||
$ curl -LOC- https://github.com/simonmichael/hledger/releases/download/A.BB/hledger-mac-x64.zip
|
curl -LOC- https://github.com/simonmichael/hledger/releases/download/A.BB/hledger-mac-x64.zip
|
||||||
$ unzip -X hledger-mac-x64.zip
|
unzip hledger-mac-x64.zip; tar xvf hledger-mac-x64.tar; rm hledger-mac-x64.{zip,tar} # github workaround, preserves permissions
|
||||||
$ open .
|
open .
|
||||||
# for the hledger, hledger-ui, hledger-web icons: right-click the executable, Open, confirm it's ok to run
|
# for the hledger, hledger-ui, hledger-web icons: right-click the executable, Open, confirm it's ok to run
|
||||||
$ cd -
|
cd -
|
||||||
$ hledger --version # should show the new version
|
hledger --version # should show the new version
|
||||||
$ touch $HOME/.hledger.journal # ensure a default journal file exists
|
touch $HOME/.hledger.journal # ensure a default journal file exists
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ $ touch $HOME/.hledger.journal # ensure a default journal file exists
|
|||||||
|
|
||||||
In a powershell window (press Windows-r, type powershell, press enter),
|
In a powershell window (press Windows-r, type powershell, press enter),
|
||||||
|
|
||||||
Make a place to keep hledger binaries, and add it to your PATH. You only need to do this once, not for every release. This is optional, but makes running hledger easier.
|
Make a place to keep hledger binaries, and add it to your PATH; this makes running hledger easier. You only need to do this once, not for every release.
|
||||||
```
|
```
|
||||||
mkdir -force $HOME\bin >$null
|
mkdir -force $HOME\bin >$null
|
||||||
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
|
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::User)+";"+$HOME+"\bin", [EnvironmentVariableTarget]::User)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user