Merge pull request #7 from henri9813/stye-cleanup #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
generate-icons: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/generate-icons | |
windows-build: | |
runs-on: windows-latest | |
needs: [ generate-icons ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: icons | |
path: icons | |
- run: go build -ldflags -H=windowsgui -o ipingtray.exe | |
- name: Set up NSIS | |
run: choco install nsis | |
- name: Create installer | |
run: | | |
cp build/windows/installer.nsi . | |
& "C:\Program Files (x86)\NSIS\makensis.exe" "installer.nsi" | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: iPingTray-setup.exe | |
path: iPingTray-setup.exe | |
macos-build: | |
runs-on: macos-13 | |
needs: [ generate-icons ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: icons | |
path: icons | |
- run: go build -o ipingtray | |
- run: go install github.com/machinebox/appify@latest | |
- name: Create macOS app | |
run: | | |
appify -name "IPingTray" -icon docs/icon.png ipingtray | |
cp build/macos/Info.plist IpingTray.app/Contents/Info.plist | |
- name: Install create-dmg | |
run: brew install create-dmg | |
- name: Prepare DMG | |
run: | | |
mkdir dmg | |
mv iPingTray.app dmg/iPingTray.app | |
ln -s /Applications dmg/Applications | |
create-dmg iPingTray.dmg dmg | |
- name: Upload DMG artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: iPingTray.dmg | |
path: iPingTray.dmg | |
release: | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
needs: | |
- macos-build | |
- windows-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
- run: find . | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: "configure semantic-release" | |
run: npm install -D semantic-release @semantic-release/github | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |