|
1 | 1 | on: [push, pull_request] |
2 | 2 | name: Build binaries |
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + packages: write |
3 | 6 | jobs: |
4 | 7 | build-macos: |
5 | 8 | strategy: |
6 | 9 | matrix: |
7 | | - go-version: ["1.17"] |
| 10 | + go-version: ["1.23"] |
8 | 11 | os: [macos-latest] |
9 | 12 | runs-on: ${{ matrix.os }} |
10 | 13 | env: |
@@ -34,23 +37,23 @@ jobs: |
34 | 37 | # We cd so that the binary ends up in the top level of the tar. |
35 | 38 | cd build/macos && tar -czvf smimesign-macos-${{ env.GIT_VERSION }}.tgz smimesign |
36 | 39 | - name: Upload build folder to the action |
37 | | - uses: actions/upload-artifact@v2 |
| 40 | + uses: actions/upload-artifact@v4 |
38 | 41 | with: |
39 | 42 | # Note: this artifact is shared across jobs: |
40 | 43 | # https://github.com/actions/upload-artifact#uploading-to-the-same-artifact |
41 | 44 | name: build |
42 | 45 | path: build/ |
43 | 46 | - name: Upload macOS files to the release |
44 | | - # Pinned hash from https://github.com/softprops/action-gh-release/releases/tag/v0.1.12 |
45 | | - uses: softprops/action-gh-release@2d72d869af3bf23602f9593a1e3fd739b80ac1eb |
| 47 | + # Pinned hash from https://github.com/softprops/action-gh-release/releases/tag/v2.0.8 |
| 48 | + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 |
46 | 49 | if: startsWith(github.ref, 'refs/tags/v') |
47 | 50 | with: |
48 | 51 | files: | |
49 | 52 | build/macOS/smimesign-macos-${{ env.GIT_VERSION }}.tgz |
50 | 53 | build-windows: |
51 | 54 | strategy: |
52 | 55 | matrix: |
53 | | - go-version: ["1.17"] |
| 56 | + go-version: ["1.23"] |
54 | 57 | os: [windows-latest] |
55 | 58 | runs-on: ${{ matrix.os }} |
56 | 59 | env: |
|
88 | 91 | run: | |
89 | 92 | GOARCH=amd64 go build -o "build/amd64/smimesign.exe" -ldflags "-X main.versionString=${{ env.GIT_VERSION }}" |
90 | 93 | - name: Switch MinGW to x86 |
91 | | - # Pinned hash from https://github.com/egor-tensin/setup-mingw/releases/tag/v2 |
92 | | - uses: egor-tensin/setup-mingw@f3c5d799aadf8fa230ac67a422b01dd085bbc96b |
| 94 | + # Pinned hash from https://github.com/egor-tensin/setup-mingw/releases/tag/v2.2.0 |
| 95 | + uses: egor-tensin/setup-mingw@84c781b557efd538dec66bde06988d81cd3138cf |
93 | 96 | with: |
94 | 97 | platform: x86 |
95 | 98 | - name: Build 386 |
@@ -119,15 +122,15 @@ jobs: |
119 | 122 | mv build/amd64/smimesign.zip build/amd64/smimesign-windows-amd64-${{ env.GIT_VERSION }}.zip |
120 | 123 | mv build/386/smimesign.zip build/386/smimesign-windows-386-${{ env.GIT_VERSION }}.zip |
121 | 124 | - name: Upload build folder to the action |
122 | | - uses: actions/upload-artifact@v2 |
| 125 | + uses: actions/upload-artifact@v4 |
123 | 126 | with: |
124 | 127 | # Note: this artifact is shared across jobs: |
125 | 128 | # https://github.com/actions/upload-artifact#uploading-to-the-same-artifact |
126 | 129 | name: build |
127 | 130 | path: build/ |
128 | 131 | - name: Upload Windows files to the release |
129 | | - # Pinned hash from https://github.com/softprops/action-gh-release/releases/tag/v0.1.12 |
130 | | - uses: softprops/action-gh-release@2d72d869af3bf23602f9593a1e3fd739b80ac1eb |
| 132 | + # Pinned hash from https://github.com/softprops/action-gh-release/releases/tag/v2.0.8 |
| 133 | + uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 |
131 | 134 | if: startsWith(github.ref, 'refs/tags/v') |
132 | 135 | with: |
133 | 136 | files: | |
|
0 commit comments