mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-09 21:22:26 +03:00
ci: update all to preserve executable permission when zipping
This commit is contained in:
parent
7a8f2c1c8a
commit
863983f0ff
@ -20,14 +20,13 @@ jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Set up QEMU
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build and push
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -36,17 +35,16 @@ jobs:
|
||||
tags: hledger-linux-static-arm32v7:latest
|
||||
load: true
|
||||
|
||||
- name: Extract binaries from docker
|
||||
- name: Gather binaries from docker
|
||||
run: |
|
||||
# Create temporary container from it
|
||||
container_id=$(docker create hledger-linux-static-arm32v7:latest)
|
||||
# Copy stuff from temp container
|
||||
docker cp $container_id:/root/hledger /tmp/hledger-linux-static-arm32v7
|
||||
# Delete temp container
|
||||
docker cp $container_id:/root/hledger tmp
|
||||
docker rm -v $container_id
|
||||
cd tmp
|
||||
zip hledger-linux-static-arm32v7.zip hledger hledger-ui hledger-web
|
||||
|
||||
- name: Upload binary
|
||||
- name: Upload binaries artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: hledger-linux-static-arm32v7
|
||||
path: /tmp/hledger-linux-static-arm32v7
|
||||
path: tmp/hledger-linux-static-arm32v7.zip
|
||||
|
20
.github/workflows/binaries-linux-x64-static.yml
vendored
20
.github/workflows/binaries-linux-x64-static.yml
vendored
@ -54,18 +54,20 @@ jobs:
|
||||
cabal build --enable-executable-static hledger-ui || echo "ERROR: building hledger failed"
|
||||
cabal build --enable-executable-static hledger-web || echo "ERROR: building hledger-web failed"
|
||||
|
||||
- name: Extract and strip binaries
|
||||
- name: Gather binaries
|
||||
run: |
|
||||
mkdir /tmp/hledger
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-*/x/hledger/build/hledger/hledger /tmp/hledger/hledger
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-ui-*/x/hledger-ui/build/hledger-ui/hledger-ui /tmp/hledger/hledger-ui
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-web-*/x/hledger-web/build/hledger-web/hledger-web /tmp/hledger/hledger-web
|
||||
strip /tmp/hledger/hledger
|
||||
strip /tmp/hledger/hledger-ui
|
||||
strip /tmp/hledger/hledger-web
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-*/x/hledger/build/hledger/hledger .
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-ui-*/x/hledger-ui/build/hledger-ui/hledger-ui .
|
||||
cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-web-*/x/hledger-web/build/hledger-web/hledger-web .
|
||||
strip hledger
|
||||
strip hledger-ui
|
||||
strip hledger-web
|
||||
zip hledger-linux-x64.zip hledger hledger-ui hledger-web
|
||||
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: hledger-linux-x64
|
||||
path: /tmp/hledger
|
||||
path: tmp/hledger-linux-x64.zip
|
||||
|
4
.github/workflows/binaries-mac-x64.yml
vendored
4
.github/workflows/binaries-mac-x64.yml
vendored
@ -159,7 +159,7 @@ jobs:
|
||||
|
||||
# artifacts:
|
||||
|
||||
- name: Gather executables
|
||||
- name: Gather binaries
|
||||
run: |
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
@ -173,7 +173,7 @@ jobs:
|
||||
if: env.CONTINUE
|
||||
|
||||
# XXX intermittent upload failures
|
||||
- name: Upload executables artifact
|
||||
- name: Upload binaries artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: hledger-mac-x64
|
||||
|
9
.github/workflows/binaries-windows-x64.yml
vendored
9
.github/workflows/binaries-windows-x64.yml
vendored
@ -162,22 +162,21 @@ jobs:
|
||||
|
||||
# artifacts:
|
||||
|
||||
- name: Gather executables
|
||||
- name: Gather binaries
|
||||
run: |
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
mkdir hledger-windows-x64
|
||||
cd hledger-windows-x64
|
||||
cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger.exe .
|
||||
cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-web.exe .
|
||||
strip hledger.exe
|
||||
strip hledger-web.exe
|
||||
zip hledger-windows-x64.zip hledger.exe hledger-web.exe
|
||||
if: env.CONTINUE
|
||||
|
||||
# XXX intermittent upload failures
|
||||
- name: Create executables artifact
|
||||
- name: Create binaries artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: hledger-windows-x64
|
||||
path: tmp/hledger-windows-x64
|
||||
path: tmp/hledger-windows-x64.zip
|
||||
if: env.CONTINUE
|
||||
|
5
.github/workflows/test-linux-x64.yml
vendored
5
.github/workflows/test-linux-x64.yml
vendored
@ -263,7 +263,7 @@ jobs:
|
||||
# --no-print-missing-docs is 600% quieter
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Gather executables
|
||||
- name: Gather binaries
|
||||
id: exes
|
||||
run: |
|
||||
mkdir tmp
|
||||
@ -275,14 +275,13 @@ jobs:
|
||||
strip hledger-ui
|
||||
strip hledger-web
|
||||
zip hledger-linux-x64.zip hledger hledger-ui hledger-web
|
||||
# ^ create zip file ourselves, upload-artifact's zipping drops executable permissions
|
||||
if: env.CONTINUE
|
||||
|
||||
# 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)"
|
||||
|
||||
# XXX intermittent upload failures
|
||||
- name: Upload executables artifact
|
||||
- name: Upload binaries artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: hledger-linux-x64
|
||||
|
Loading…
Reference in New Issue
Block a user