From 34a485e4d8bc0a612e8a3e3dd03e2262f7e9b0ff Mon Sep 17 00:00:00 2001 From: Richard Lehane Date: Fri, 21 Jun 2024 14:11:13 +1000 Subject: [PATCH] update actions deps; add win7 build --- .github/workflows/bench.yaml | 4 +-- .github/workflows/docker.yaml | 2 +- .github/workflows/release.yaml | 48 ++++++++++++++++++++++++++-------- .github/workflows/test.yaml | 4 +-- 4 files changed, 42 insertions(+), 16 deletions(-) diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index 4a28068f..0c76b91b 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Install latest version of go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.x - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: richardlehane/provisioner - name: Install provisioner diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index baa0e3eb..5eadbf53 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -12,7 +12,7 @@ jobs: VERSION=$(curl https://api.github.com/repos/richardlehane/siegfried/releases/latest | grep -Po '\"tag_name\": \"v\K[^\"]*') echo "VERSION=$VERSION" >> $GITHUB_ENV - name: Repository dispatch - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.KEEPS_ACCESS_TOKEN }} repository: 'keeps/siegfried-docker' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 790f0637..4d6066b1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,9 +15,9 @@ jobs: version: ${{ env.VERS }} steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install latest version of go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.x - name: Make sf and roy binaries @@ -44,7 +44,7 @@ jobs: - name: Zip self-contained executable run: zip -j siegfried_${{ env.VERS }}_linux64_static.zip ${{ env.BIN_PATH }}/sf - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: release-artifacts path: | @@ -58,9 +58,9 @@ jobs: VERSION: ${{needs.buildDeb.outputs.version}} steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install latest version of go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.x - name: Make sf and roy binaries @@ -87,9 +87,9 @@ jobs: VERSION: ${{needs.buildDeb.outputs.version}} steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install latest version of go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: 1.x - name: Make sf and roy binaries @@ -109,25 +109,51 @@ jobs: shell: pwsh run: 7z a siegfried_${{ env.VERSION }}_win64_static.zip ((go env GOPATH) + "\bin\sf.exe") - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: release-artifacts path: | siegfried_${{ env.VERSION }}_win64.zip siegfried_${{ env.VERSION }}_win64_static.zip data_${{ env.VERSION }}.zip + buildWin7: + runs-on: windows-latest + needs: buildDeb + env: + VERSION: ${{needs.buildDeb.outputs.version}} + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install latest version of go + uses: actions/setup-go@v5 + with: + go-version: 1.20 + - name: Make sf and roy binaries + run: | + go install github.com/richardlehane/siegfried/cmd/sf + go install github.com/richardlehane/siegfried/cmd/roy + - name: Zip binaries + shell: pwsh + run: | + 7z a siegfried_${{ env.VERSION }}_win7.zip ((go env GOPATH) + "\bin\*.exe") + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: release-artifacts + path: | + siegfried_${{ env.VERSION }}_win7.zip createRelease: runs-on: ubuntu-latest - needs: [buildMac, buildWin] + needs: [buildMac, buildWin, buildWin7] steps: - name: Set version run: echo "VERSION=$(echo "${{ github.ref }}" | cut -c12-)" >> $GITHUB_ENV - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: release-artifacts path: release-artifacts - name: Create release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: name: Version ${{ env.VERSION }} prerelease: ${{ contains(github.ref, 'rc') }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a9ae8956..769894b2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,9 +18,9 @@ jobs: go: [ '1.x', '1.20', '1.19', '1.18'] steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install latest version of go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - name: Run tests