From 82d7fabcead3f0fac8a1ad85e850db1fea88ede3 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Thu, 25 Apr 2024 15:03:37 +0200 Subject: [PATCH] Bump action versions in build workflow Also adjust the input for bluwy/substitute-string-action as per https://github.com/orgs/community/discussions/25387#discussioncomment-3247733 --- .github/workflows/go.build.yaml | 21 +++++++++++---------- .github/workflows/localbeach.rb.tpl | 10 +++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.build.yaml b/.github/workflows/go.build.yaml index 08c7fc8..a3f1a5b 100644 --- a/.github/workflows/go.build.yaml +++ b/.github/workflows/go.build.yaml @@ -15,15 +15,15 @@ jobs: linux_sha256sum: ${{ steps.calculate-checksums-linux.outputs.linux_sha256sum }} steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go 1.22 - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.22' id: go - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: Get dependencies run: | go generate -v @@ -43,13 +43,13 @@ jobs: done - name: Archive build result (darwin) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: beach-osx path: beach_darwin_amd64.zip - name: Archive build result (linux) - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: beach-linux path: beach_linux_amd64.zip @@ -98,14 +98,15 @@ jobs: # see: https://github.com/bluwy/substitute-string-action - name: Substitute Homebrew variables - uses: bluwy/substitute-string-action@v2 + uses: bluwy/substitute-string-action@v3 with: _input-file: homebrew/Formula/localbeach.rb _output-file: homebrew/Formula/localbeach.rb _format-key: "{{key}}" - version: ${{ env.RELEASE_VERSION }} - darwin_sha256sum: ${{ needs.build.outputs.darwin_sha256sum }} - linux_sha256sum: ${{ needs.build.outputs.linux_sha256sum }} + env: + INPUT_VERSION: ${{ env.RELEASE_VERSION }} + INPUT_DARWIN_SHA256SUM: ${{ needs.build.outputs.darwin_sha256sum }} + INPUT_LINUX_SHA256SUM: ${{ needs.build.outputs.linux_sha256sum }} - name: Commit update run: | diff --git a/.github/workflows/localbeach.rb.tpl b/.github/workflows/localbeach.rb.tpl index 1a3c6fb..b0863b6 100644 --- a/.github/workflows/localbeach.rb.tpl +++ b/.github/workflows/localbeach.rb.tpl @@ -7,14 +7,14 @@ class Localbeach < Formula desc "Command-line tool for Flownative Beach" homepage "https://www.flownative.com/beach" license "GPL-3.0-or-later" - version "{{version}}" + version "{{VERSION}}" if RUBY_PLATFORM.downcase.include?("darwin") - url "https://github.com/flownative/localbeach/releases/download/{{version}}/beach_darwin_amd64.zip" - sha256 "{{darwin_sha256sum}}" + url "https://github.com/flownative/localbeach/releases/download/{{VERSION}}/beach_darwin_amd64.zip" + sha256 "{{DARWIN_SHA256SUM}}" else - url "https://github.com/flownative/localbeach/releases/download/{{version}}/beach_linux_amd64.zip" - sha256 "{{linux_sha256sum}}" + url "https://github.com/flownative/localbeach/releases/download/{{VERSION}}/beach_linux_amd64.zip" + sha256 "{{LINUX_SHA256SUM}}" end depends_on "mkcert" => :run