Skip to content

Commit

Permalink
fix: hopefully fix version issues in pkg builds
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Apr 23, 2024
1 parent 7092fa0 commit 8ad5a60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
type: string
jobs:
pkg:
name: Build {{ inputs.package }}-${{ inputs.version }}
name: Build {{ inputs.package }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
strategy:
Expand Down Expand Up @@ -39,13 +39,16 @@ jobs:
- name: Init Hermit
run: ./bin/hermit env --raw >> $GITHUB_ENV
- name: Build
id: build
run: |
if [ -f /opt/rh/devtoolset-11/enable ]; then . /opt/rh/devtoolset-11/enable; fi
make VERSION=${{ inputs.version }} -C pkgs/${{ inputs.package }}
make -C pkgs/${{ inputs.package }}
# Output version for release action
echo "version=$(make -C pkgs/${{ inputs.package }} version)" >> $GITHUB_ENV
- name: Upload Release
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.package }}-${{ inputs.version }}
tag: ${{ inputs.package }}-${{ steps.build.outputs.version }}
allowUpdates: true
artifacts: "pkgs/${{ inputs.package }}/${{ inputs.package }}-${{ inputs.version }}-*.tar.xz"
artifacts: "pkgs/${{ inputs.package }}/${{ inputs.package }}-${{ steps.build.outputs.version }}-*.tar.xz"
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion pkgs/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ clean:
$(OUTPUT): pkg.tar.gz
$(MAKE) clean deps
mkdir build dist
tar -C build --strip-components 1 -xf pkg.tar.gz
tar -C build --strip-components 1 -xf pkg.tar.gz
sandbox $(MAKE) -C build -f ../Makefile configure
sandbox $(MAKE) -C build -f ../Makefile build
sandbox $(MAKE) -C build -f ../Makefile install
Expand All @@ -48,3 +48,6 @@ $(DEPS):

pkg.tar.gz:
curl -fsSL $(SOURCE) -o pkg.tar.gz

version:
@echo $(VERSION)

0 comments on commit 8ad5a60

Please sign in to comment.