diff --git a/.github/workflows/binaries-linux-arm32v7.yml b/.github/workflows/_binaries-linux-arm32v7.yml similarity index 100% rename from .github/workflows/binaries-linux-arm32v7.yml rename to .github/workflows/_binaries-linux-arm32v7.yml diff --git a/.github/workflows/binaries-linux-x64-stack.yml b/.github/workflows/_binaries-linux-x64-stack.yml similarity index 87% rename from .github/workflows/binaries-linux-x64-stack.yml rename to .github/workflows/_binaries-linux-x64-stack.yml index 6899ec778..05425c467 100644 --- a/.github/workflows/binaries-linux-x64-stack.yml +++ b/.github/workflows/_binaries-linux-x64-stack.yml @@ -1,6 +1,8 @@ -# TRIGGER: Runs on any push to binaries-linux-x64-stack branch. Not normally used. -# ACTION: Builds, unit-tests and saves mac x64 static binaries with stack and the default ghc. May not work, -# the cabal-based binaries-linux-x64.yml is normally used instead. +# Alternate binaries-linux workflow, using stack like the others for consistency. May not work. +# Currently the cabal-based binaries-linux-x64.yml is used instead, for cabal testing and for easier static building. +# +# TRIGGER: Runs on any push to binaries-linux-x64-stack branch. +# ACTION: Builds, unit-tests and saves mac x64 static binaries with stack and the default ghc. name: binaries-linux-x64-stack on: @@ -119,15 +121,16 @@ jobs: - name: Gather binaries run: | mkdir tmp - cp hledger/shell-completion/hledger-completion.bash hledger/embeddedfiles/*.{1,info} tmp - cd tmp - cp ~/.local/bin/hledger . - cp ~/.local/bin/hledger-ui . - cp ~/.local/bin/hledger-web . - strip hledger - strip hledger-ui - strip hledger-web - tar cvf hledger-mac-x64.tar hledger hledger-ui hledger-web hledger-completion.bash + cp ~/.local/bin/hledger tmp + cp ~/.local/bin/hledger-ui tmp + cp ~/.local/bin/hledger-web tmp + cp hledger/embeddedfiles/*.1 tmp + cp hledger/embeddedfiles/*.info tmp + cp hledger/shell-completion/hledger-completion.bash tmp + strip tmp/hledger + strip tmp/hledger-ui + strip tmp/hledger-web + tar -C tmp cvf hledger-linux-x64.tar hledger hledger-ui hledger-web hledger-completion.bash # 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. diff --git a/.github/workflows/binaries-linux-x64.yml b/.github/workflows/binaries-linux-x64.yml index 9f15e6fc5..70c74181d 100644 --- a/.github/workflows/binaries-linux-x64.yml +++ b/.github/workflows/binaries-linux-x64.yml @@ -72,12 +72,13 @@ jobs: cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-*/x/hledger/build/hledger/hledger tmp cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-ui-*/x/hledger-ui/build/hledger-ui/hledger-ui tmp cp dist-newstyle/build/x86_64-linux/ghc-*/hledger-web-*/x/hledger-web/build/hledger-web/hledger-web tmp - cp hledger/shell-completion/hledger-completion.bash hledger/embeddedfiles/*.1 hledger/embeddedfiles/*.info tmp - cd tmp - strip hledger - strip hledger-ui - strip hledger-web - tar cvf hledger-linux-x64.tar hledger hledger-ui hledger-web hledger-completion.bash + cp hledger/embeddedfiles/*.1 tmp + cp hledger/embeddedfiles/*.info tmp + cp hledger/shell-completion/hledger-completion.bash tmp + strip tmp/hledger + strip tmp/hledger-ui + strip tmp/hledger-web + tar -C tmp cvf hledger-linux-x64.tar hledger hledger-ui hledger-web hledger-completion.bash # 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. diff --git a/.github/workflows/binaries-mac-arm64.yml b/.github/workflows/binaries-mac-arm64.yml index 98c06932f..10165c08a 100644 --- a/.github/workflows/binaries-mac-arm64.yml +++ b/.github/workflows/binaries-mac-arm64.yml @@ -157,15 +157,16 @@ jobs: - name: Gather binaries run: | mkdir tmp - cp hledger/shell-completion/hledger-completion.bash hledger/embeddedfiles/*.{1,info} tmp - cd tmp - cp ~/.local/bin/hledger . - cp ~/.local/bin/hledger-ui . - cp ~/.local/bin/hledger-web . - strip hledger - strip hledger-ui - strip hledger-web - tar cvf hledger-mac-arm64.tar hledger hledger-ui hledger-web hledger-completion.bash + cp ~/.local/bin/hledger tmp + cp ~/.local/bin/hledger-ui tmp + cp ~/.local/bin/hledger-web tmp + cp hledger/embeddedfiles/*.1 tmp + cp hledger/embeddedfiles/*.info tmp + cp hledger/shell-completion/hledger-completion.bash tmp + strip tmp/hledger + strip tmp/hledger-ui + strip tmp/hledger-web + tar -C tmp cvf hledger-mac-arm64.tar hledger hledger-ui hledger-web hledger-completion.bash # 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. diff --git a/.github/workflows/binaries-mac-x64.yml b/.github/workflows/binaries-mac-x64.yml index 2e8aa3b37..d89340b05 100644 --- a/.github/workflows/binaries-mac-x64.yml +++ b/.github/workflows/binaries-mac-x64.yml @@ -144,15 +144,16 @@ jobs: - name: Gather binaries run: | mkdir tmp - cp hledger/shell-completion/hledger-completion.bash hledger/embeddedfiles/*.{1,info} tmp - cd tmp - cp ~/.local/bin/hledger . - cp ~/.local/bin/hledger-ui . - cp ~/.local/bin/hledger-web . - strip hledger - strip hledger-ui - strip hledger-web - tar cvf hledger-mac-x64.tar hledger hledger-ui hledger-web hledger-completion.bash + cp ~/.local/bin/hledger tmp + cp ~/.local/bin/hledger-ui tmp + cp ~/.local/bin/hledger-web tmp + cp hledger/embeddedfiles/*.1 tmp + cp hledger/embeddedfiles/*.info tmp + cp hledger/shell-completion/hledger-completion.bash tmp + strip tmp/hledger + strip tmp/hledger-ui + strip tmp/hledger-web + tar -C tmp cvf hledger-mac-x64.tar hledger hledger-ui hledger-web hledger-completion.bash # 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. diff --git a/.github/workflows/binaries-windows-x64.yml b/.github/workflows/binaries-windows-x64.yml index 2dd317575..fcb17c054 100644 --- a/.github/workflows/binaries-windows-x64.yml +++ b/.github/workflows/binaries-windows-x64.yml @@ -147,14 +147,15 @@ jobs: - name: Gather binaries run: | mkdir tmp - cp hledger/shell-completion/hledger-completion.bash hledger/embeddedfiles/*.{1,info} tmp - cd tmp - cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger.exe . - cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-ui.exe . - cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-web.exe . - strip hledger.exe - strip hledger-ui.exe - strip hledger-web.exe + cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger.exe tmp + cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-ui.exe tmp + cp /C/Users/runneradmin/AppData/Roaming/local/bin/hledger-web.exe tmp + cp hledger/embeddedfiles/*.1 tmp + cp hledger/embeddedfiles/*.info tmp + cp hledger/shell-completion/hledger-completion.bash tmp + strip tmp/hledger.exe + strip tmp/hledger-ui.exe + strip tmp/hledger-web.exe - name: Create binaries artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/old/release.yml b/.github/workflows/old/release.yml deleted file mode 100644 index b89cf16d1..000000000 --- a/.github/workflows/old/release.yml +++ /dev/null @@ -1,46 +0,0 @@ -# Runs on push of a [0-9]* or r[0-9]* tag (to any branch ?) - -# Creates a draft github release. -# See https://github.com/actions/create-release, still pretty rough as of 20200609. -# see also: https://github.com/marketplace/actions/tag-release-on-push-action - -name: create release - -# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags -# also: "The action does not seem to work for tags created before the workflow." -on: - push: - tags: - - '[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+-*' - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-*' - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - - - name: Checkout code - uses: actions/checkout@v2 - - # - name: Create Release (actions/create-release) - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - # with: - # tag_name: X.Y - # release_name: X.Y - # body: | - # CHANGE 1; CHANGE 2. - # https://hledger.org/release-notes.html#hledger-X-Y - # draft: true - # prerelease: true - - - name: Create Release (softprops/action-gh-release) - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8467ca3cc..aa23b9990 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -97,13 +97,6 @@ jobs: allow_forks: false path: artifacts - - name: Get artifact from latest successful binaries-mac-x64 run - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe - with: - workflow: binaries-mac-x64.yml - allow_forks: false - path: artifacts - - name: Get artifact from latest successful binaries-mac-arm64 run uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe with: @@ -111,6 +104,13 @@ jobs: allow_forks: false path: artifacts + - name: Get artifact from latest successful binaries-mac-x64 run + uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe + with: + workflow: binaries-mac-x64.yml + allow_forks: false + path: artifacts + - name: Inspect artifacts shell: bash run: |