Add Off Grid AI (private on-device AI for Mac) to AI Tools (#2256) #1209
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
| name: GitHub Actions Build and Deploy awesome-mac | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 50 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: npm install | |
| - run: npm run build | |
| - run: npm run create:ast | |
| - run: npm run feed | |
| - name: Commit updated RSS feeds | |
| run: | | |
| if git diff --quiet -- feed/*.xml; then | |
| echo "No RSS feed changes to commit." | |
| exit 0 | |
| fi | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add feed/*.xml | |
| git commit \ | |
| -m "chore: update RSS feeds [skip ci]" \ | |
| -m "Refresh generated RSS feeds for recently added high-quality macOS apps." \ | |
| -m "Feeds: | |
| https://jaywcjlove.github.io/awesome-mac/feed.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-zh.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-ko.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-ja.xml" | |
| git push | |
| - run: cp -rp feed/*.xml dist | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist | |
| user_name: github-actions[bot] | |
| user_email: github-actions[bot]@users.noreply.github.com | |
| - name: Create Tag | |
| id: create_tag | |
| uses: jaywcjlove/create-tag-action@5cd7624be00f5ca9f6c0929957553205dd035864 # main | |
| with: | |
| package-path: ./package.json | |
| - name: Generate Changelog | |
| id: changelog | |
| uses: jaywcjlove/changelog-generator@8e2e0cff25d4500fb7cc4c7c87f0733b8f80ff5b # main | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| head-ref: ${{steps.create_tag.outputs.version}} | |
| filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}' | |
| - name: Create Release | |
| uses: jaywcjlove/create-tag-action@5cd7624be00f5ca9f6c0929957553205dd035864 # main | |
| if: steps.create_tag.outputs.successful | |
| with: | |
| package-path: ./package.json | |
| version: ${{steps.create_tag.outputs.version}} | |
| release: true | |
| prerelease: false | |
| draft: false | |
| body: | | |
| [](https://jaywcjlove.github.io/#/sponsor) [](https://uiwjs.github.io/npm-unpkg/#/pkg/awesome-mac@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [](https://hub.docker.com/r/wcjiang/awesome-mac) | |
| Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/awesome-mac/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html | |
| Comparing Changes: ${{ steps.changelog.outputs.compareurl }} | |
| ${{ steps.changelog.outputs.changelog }} | |
| ```bash | |
| npm i awesome-mac@${{steps.create_tag.outputs.versionNumber}} | |
| # dist/awesome-mac.json | |
| # dist/awesome-mac.zh.json | |
| # dist/awesome-mac.ja.json | |
| # dist/awesome-mac.ko.json | |
| ``` | |
| ## Feed | |
| ```text | |
| https://jaywcjlove.github.io/awesome-mac/feed.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-zh.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-ko.xml | |
| https://jaywcjlove.github.io/awesome-mac/feed-ja.xml | |
| ``` | |
| ## Docker | |
| ```bash | |
| docker pull wcjiang/awesome-mac:${{steps.changelog.outputs.version}} | |
| ``` | |
| ```bash | |
| docker run --name awesome-mac --rm -d -p 9881:3000 wcjiang/awesome-mac:${{steps.changelog.outputs.version}} | |
| # Or | |
| docker run --name awesome-mac -itd -p 9881:3000 wcjiang/awesome-mac:${{steps.changelog.outputs.version}} | |
| ``` | |
| Visit the following URL in your browser | |
| ```bash | |
| http://localhost:9881/ | |
| ``` | |
| - run: npm publish --access public --provenance | |
| continue-on-error: true | |
| # Create Docker Image | |
| - name: Docker login | |
| if: steps.create_tag.outputs.successful | |
| run: docker login -u "${DOCKER_USER}" -p "${DOCKER_PASSWORD}" | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build Awesome Mac image | |
| run: docker image build -t awesome-mac . | |
| - name: Tags & Push image (latest) | |
| if: steps.create_tag.outputs.successful | |
| run: | | |
| echo "outputs.tag - ${{ steps.changelog.outputs.version }}" | |
| docker tag awesome-mac "${DOCKER_USER}"/awesome-mac:latest | |
| docker push "${DOCKER_USER}"/awesome-mac:latest | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
| - name: Tags & Push image | |
| if: steps.create_tag.outputs.successful | |
| run: | | |
| echo "outputs.tag - ${{ steps.changelog.outputs.version }}" | |
| docker tag awesome-mac "${DOCKER_USER}"/awesome-mac:${{steps.changelog.outputs.version}} | |
| docker push "${DOCKER_USER}"/awesome-mac:${{steps.changelog.outputs.version}} | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKER_USER }} |