Skip to content

Commit

Permalink
Update publish.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
baldm committed Jul 16, 2024
1 parent 2dd8ce1 commit e0f56c1
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,20 @@ jobs:
sudo apt install libcurl4-openssl-dev
- name: Build with Gradle
run: ./gradlew commonBinaries
- name: Rename executable based on runner
- name: Move and apply correct permissions to binary
run: |
if [ "${{ matrix.machine }}" == "self-hosted-arm64" ]; then
cp build/bin/common/releaseExecutable/slack-notifier-cli.kexe ./slack-notifier-cli-arm
chmod +x ./slack-notifier-cli-arm
else
cp build/bin/common/releaseExecutable/slack-notifier-cli.kexe ./slack-notifier-cli
chmod +x ./slack-notifier-cli
fi
cp build/bin/common/releaseExecutable/slack-notifier-cli.kexe ./slack-notifier-cli-${{ runner.arch }}
chmod +x ./slack-notifier-cli-${{ runner.arch }}
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.machine == 'self-hosted-arm64' && 'slack-notifier-cli-arm' || 'slack-notifier-cli' }}
path: ${{ matrix.machine == 'self-hosted-arm64' && 'slack-notifier-cli-arm' || 'slack-notifier-cli' }}
name: slack-notifier-cli-${{ runner.arch }}
path: slack-notifier-cli-${{ runner.arch }}
change-log:
runs-on: ubuntu-latest
strategy:
matrix:
machine: [ubuntu-latest, self-hosted-arm64]
runs-on: ${{ matrix.machine }}
needs: build
timeout-minutes: 5
steps:
Expand All @@ -69,24 +67,12 @@ jobs:
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: slack-notifier-cli
- name: Download a single artifact for arm
uses: actions/download-artifact@v4
with:
name: slack-notifier-cli-arm
name: slack-notifier-cli-${{ runner.arch }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: slack-notifier-cli
asset_name: slack-notifier-cli
file: slack-notifier-cli-${{ runner.arch }}
asset_name: slack-notifier-cli-${{ runner.arch }}
tag: ${{ github.ref }}
overwrite: true
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: slack-notifier-cli-arm
asset_name: slack-notifier-cli-arm
tag: ${{ github.ref }}
overwrite: true

0 comments on commit e0f56c1

Please sign in to comment.