Skip to content

Commit

Permalink
ci: couple of more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Nov 2, 2024
1 parent e02bd20 commit 8be5c57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ jobs:
- uses: actions/checkout@v4
with:
sparse-checkout: |
spex.cabal
Makefile
CHANGELOG.md
sparse-checkout-cone-mode: false
Expand All @@ -185,11 +186,6 @@ jobs:
pattern: spex-*
merge-multiple: true

- name: Install upx
run: |
sudo apt-get update
sudo apt-get install upx-ucl
- name: Compress binaries and create release
env:
NEW_VERSION: ${{ needs.arm64-macos-binary.outputs.new-version }}
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
OS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
PLATFORM := $(shell uname -m)-$(OS)
CABAL_VERSION := $(shell awk '/^version:/ { print "v"$$2 }' spex.cabal)
CABAL_VERSION := $(shell awk '/^version:/ { print $$2 }' spex.cabal)
RELEASED_VERSION := $(shell gh release list --limit 1 \
--exclude-drafts --exclude-pre-releases \
--json tagName --jq '.[].tagName // "unreleased"')
--json tagName \
--jq '.[].tagName // "unreleased" | sub("^v"; "") ')
GITHUB_ACTIONS ?= false

# This default file is used for simulating GitHub actions outputs locally:
Expand Down Expand Up @@ -78,7 +79,10 @@ install:
endif

release:
ifeq ($(GITHUB_ACTIONS),"true")
@echo "NEW_VERSION=$(NEW_VERSION)"
@echo "GITHUB_ACTIONS=$(GITHUB_ACTIONS)"
@echo "SPEX_BIN=$(SPEX_BIN)"
ifeq ($(GITHUB_ACTIONS),true)
upx -q $(SPEX_BIN)
gh release create --draft --notes-file=CHANGELOG.md \
"v$(NEW_VERSION)" $(SPEX_BIN)/*
Expand Down

0 comments on commit 8be5c57

Please sign in to comment.