Skip to content

ci: release not work #7

ci: release not work

ci: release not work #7

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: read
jobs:
macos-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-13, macos-14 ]
steps:
- name: Determine architecture
id: architecture
run: echo "arch=$(uname -m)" >> "${GITHUB_ENV}"
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- 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
- name: Prepare DMG
run: mkdir dmg && mv IPingTray.app dmg/ && ln -s /Applications dmg/Applications
- name: Install create-dmg
run: brew install create-dmg
- name: Create DMG
run: create-dmg IPingTray.dmg dmg
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: ipingtray-${{ env.arch }}.dmg
path: IPingTray.dmg
release:
permissions:
contents: write
issues: write
pull-requests: write
needs:
- macos-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 @semantic-release/github -D
cat <<EOF > .releaserc.yml
branches:
- 'main'
plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/release-notes-generator':
- "@semantic-release/github":
assets:
- path: dist/*
- '@semantic-release/github'
- '@semantic-release/changelog'
- "@semantic-release/git":
message: "chore(release): v\${nextRelease.version}\n\n\${nextRelease.notes}"
publish:
- '@semantic-release/github'
verifyConditions:
- '@semantic-release/github'
success: false
fail: false
npmPublish: false
EOF
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}