File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535
3636 - name : Get Composer cache directory
3737 id : composer-cache
38- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
38+ run : echo "dir=$(cd legacy && composer config cache-files-dir)" >> $GITHUB_OUTPUT
3939
4040 - name : Cache Composer dependencies
4141 uses : actions/cache@v4
5151 id : php-version
5252 run : echo "version=$(grep '^PHP_VERSION' Makefile | cut -d= -f2 | tr -d ' ')" >> $GITHUB_OUTPUT
5353
54+ - name : Get tool versions from Makefile
55+ id : tool-versions
56+ run : |
57+ echo "goreleaser=$(grep '^GORELEASER_VERSION' Makefile | cut -d= -f2 | tr -d ' ')" >> $GITHUB_OUTPUT
58+ echo "repogen=$(grep '^REPOGEN_VERSION' Makefile | cut -d= -f2 | tr -d ' ')" >> $GITHUB_OUTPUT
59+
5460 - name : Cache PHP binaries
5561 uses : actions/cache@v4
5662 id : php-cache
6874 openssl rsa -in /tmp/rsa-signing-key.pem -pubout -out /tmp/rsa-signing-key.pub
6975 echo "${{ secrets.GPG_SIGNING_KEY }}" | base64 -d > /tmp/gpg-signing-key.asc
7076
77+ - name : Cache Go binaries
78+ uses : actions/cache@v4
79+ with :
80+ path : ~/go/bin
81+ key : ${{ runner.os }}-go-bin-goreleaser-${{ steps.tool-versions.outputs.goreleaser }}-repogen-${{ steps.tool-versions.outputs.repogen }}
82+
83+ - name : Install Go tools
84+ run : make goreleaser repogen
85+
7186 - name : Build release (tag)
7287 if : startsWith(github.ref, 'refs/tags/')
7388 env :
8499 GPG_SIGNING_KEY_FILE : /tmp/gpg-signing-key.asc
85100 run : make snapshot
86101
87- - name : Install repogen
88- run : go install github.com/ralt/repogen/cmd/repogen@latest
89-
90102 - name : Configure AWS credentials
91103 uses : aws-actions/configure-aws-credentials@v4
92104 with :
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ VERSION := $(shell git describe --always)
1919
2020# Tooling versions
2121GORELEASER_VERSION =v2.12.0
22+ REPOGEN_VERSION =v1.0.4
2223
2324# PHP binaries are downloaded from cli-php-builds releases.
2425# See: https://github.com/upsun/cli-php-builds
@@ -74,6 +75,10 @@ php: internal/legacy/archives/php_$(GOOS)_$(GOARCH)
7475goreleaser :
7576 command -v goreleaser > /dev/null || go install github.com/goreleaser/goreleaser/v2@$(GORELEASER_VERSION )
7677
78+ .PHONY : repogen
79+ repogen :
80+ command -v repogen > /dev/null || go install github.com/ralt/repogen/cmd/repogen@$(REPOGEN_VERSION )
81+
7782.PHONY : single
7883single : goreleaser internal/legacy/archives/platform.phar php # # Build a single target release
7984 PHP_VERSION=$(PHP_VERSION ) goreleaser build --single-target --id=$(GORELEASER_ID ) --snapshot --clean
You can’t perform that action at this time.
0 commit comments