Skip to content

Commit

Permalink
sad
Browse files Browse the repository at this point in the history
  • Loading branch information
jbygdell committed Oct 22, 2024
1 parent 1bbb6ce commit 4277921
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release_sda-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
package_sda_admin:
needs: [release_sda_admin]
permissions:
contents: read
contents: write
packages: write
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -69,12 +69,22 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build
if: ${{ matrix.goosarch != 'windows/amd64' }}
run: |
cd sda-admin
go build -o "$BINARY_NAME" -v -ldflags="-s -w -X 'main.version=$VERSION'"
tar -czf "$BINARY_NAME.tgz" "$BINARY_NAME" ../LICENSE
echo "ARTIFACT"="$BINARY_NAME.tgz" >> $GITHUB_ENV
- name: Build windows
if: ${{ matrix.goosarch == 'windows/amd64' }}
run: |
cd sda-admin
go build -o "$BINARY_NAME" -v -ldflags="-s -w -X 'main.version=$VERSION'"
zip "$BINARY_NAME.zip" "$BINARY_NAME" ../LICENSE
echo "ARTIFACT"="$BINARY_NAME.zip" >> $GITHUB_ENV
- name: Upload artifact
run: gh release upload "sda-admin-${{ env.VERSION }}" "sda-admin/${{ env.BINARY_NAME }}.tgz"
run: gh release upload "sda-admin-${{ env.VERSION }}" "sda-admin/${{ env.ARTIFACT }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 4277921

Please sign in to comment.