|
8 | 8 | env: |
9 | 9 | CARGO_TERM_COLOR: always |
10 | 10 |
|
11 | | -jobs: |
12 | | - create-release: |
13 | | - name: Create Release |
14 | | - runs-on: ubuntu-latest |
15 | | - outputs: |
16 | | - upload_url: ${{ steps.create_release.outputs.upload_url }} |
17 | | - version: ${{ steps.get_version.outputs.version }} |
18 | | - steps: |
19 | | - - name: Get version from tag |
20 | | - id: get_version |
21 | | - run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT |
22 | | - |
23 | | - - name: Create Release |
24 | | - id: create_release |
25 | | - uses: actions/create-release@v1 |
26 | | - env: |
27 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
28 | | - with: |
29 | | - tag_name: ${{ github.ref }} |
30 | | - release_name: Release ${{ github.ref }} |
31 | | - draft: false |
32 | | - prerelease: false |
| 11 | +permissions: |
| 12 | + contents: write |
33 | 13 |
|
| 14 | +jobs: |
34 | 15 | build: |
35 | 16 | name: Build for macOS |
36 | | - needs: create-release |
37 | 17 | strategy: |
38 | 18 | matrix: |
39 | 19 | include: |
@@ -83,39 +63,11 @@ jobs: |
83 | 63 | tar czf ${{ matrix.name }}.tar.gz tide |
84 | 64 | shasum -a 256 ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256 |
85 | 65 |
|
86 | | - - name: Upload Release Asset |
87 | | - uses: actions/upload-release-asset@v1 |
88 | | - env: |
89 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + - name: Upload Release Assets |
| 67 | + uses: softprops/action-gh-release@v1 |
90 | 68 | with: |
91 | | - upload_url: ${{ needs.create-release.outputs.upload_url }} |
92 | | - asset_path: ./target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz |
93 | | - asset_name: ${{ matrix.name }}.tar.gz |
94 | | - asset_content_type: application/gzip |
95 | | - |
96 | | - - name: Upload Checksum |
97 | | - uses: actions/upload-release-asset@v1 |
| 69 | + files: | |
| 70 | + target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz |
| 71 | + target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz.sha256 |
98 | 72 | env: |
99 | 73 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
100 | | - with: |
101 | | - upload_url: ${{ needs.create-release.outputs.upload_url }} |
102 | | - asset_path: ./target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz.sha256 |
103 | | - asset_name: ${{ matrix.name }}.tar.gz.sha256 |
104 | | - asset_content_type: text/plain |
105 | | - |
106 | | - homebrew-pr: |
107 | | - name: Update Homebrew Formula (Manual) |
108 | | - needs: [create-release, build] |
109 | | - runs-on: ubuntu-latest |
110 | | - steps: |
111 | | - - name: Homebrew Instructions |
112 | | - run: | |
113 | | - echo "Release created successfully!" |
114 | | - echo "" |
115 | | - echo "To create/update your Homebrew tap:" |
116 | | - echo "1. Create a homebrew-tap repository (if you haven't already)" |
117 | | - echo "2. Add a Formula/tide.rb file with the formula" |
118 | | - echo "3. Use the release artifacts and checksums from this release" |
119 | | - echo "" |
120 | | - echo "Example command to get the SHA256:" |
121 | | - echo "curl -sL https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/tide-aarch64-apple-darwin.tar.gz | shasum -a 256" |
0 commit comments