feat(makefile): add marketing semver and build number for versioning … #63
This file contains hidden or 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
| # 📖 Simple document generation tool! Dependence Node.js run. | |
| # https://github.com/jaywcjlove/idoc | |
| name: idoc | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Create idoc config. | |
| run: | | |
| cat > idoc.yml << EOF | |
| site: MacMusicPlayer | |
| description: MacMusicPlayer is an elegant and minimalist music player for macOS, designed as a menu bar application to provide a seamless music playback experience. Built with SwiftUI, it perfectly integrates into the macOS ecosystem, delivering an exceptional user experience. | |
| keywords: macOS, music player, menu bar, SwiftUI, seamless,macOS Integration, exceptional, user experience, Minimalist Design,Audio Player | |
| favicon: MacMusicPlayer/Assets.xcassets/AppIcon.appiconset/icon-removebg.png | |
| logo: MacMusicPlayer/Assets.xcassets/AppIcon.appiconset/icon-removebg.png | |
| openSource: https://github.com/samzong/MacMusicPlayer | |
| tocs: false | |
| element: | |
| wrapper: style=max-width:720px; | |
| menus: | |
| Home: index.html | |
| About: | |
| url: https://github.com/samzong | |
| target: __blank | |
| sideEffectFiles: | |
| - README_zh.md | |
| cacheFileStat: true | |
| footer: | | |
| Copyright © {{idocYear}} <a href="https://github.com/samzong" target="_blank">samzong</a><br /> | |
| <script> | |
| function downloadLatest() { | |
| const platform = navigator.platform.toLowerCase(); | |
| const userAgent = navigator.userAgent.toLowerCase(); | |
| let downloadUrl = ''; | |
| if (platform.includes('mac')) { | |
| // macOS | |
| if (userAgent.includes('arm') || userAgent.includes('apple')) { | |
| downloadUrl = 'https://github.com/samzong/MacMusicPlayer/releases/latest/download/MacMusicPlayer-arm64.dmg'; | |
| } else { | |
| downloadUrl = 'https://github.com/samzong/MacMusicPlayer/releases/latest/download/MacMusicPlayer-x86_64.dmg'; | |
| } | |
| } else { | |
| // other | |
| window.open('https://github.com/samzong/MacMusicPlayer/releases/latest', '_blank'); | |
| return; | |
| } | |
| window.location.href = downloadUrl; | |
| } | |
| </script> | |
| EOF | |
| - run: npm install idoc@1 -g | |
| - run: idoc | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist |