Skip to content

Commit

Permalink
Merge branch 'jaywcjlove:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
luckydududu authored Apr 5, 2024
2 parents cc95c50 + 427572c commit be363c9
Show file tree
Hide file tree
Showing 26 changed files with 3,051 additions and 1,505 deletions.
9 changes: 9 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These are supported funding model platforms

# github: [jaywcjlove]
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: #npm/mocker-api
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
custom: https://jaywcjlove.github.io/#/sponsor
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW_ADDITION_TO_LIST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🎉 Addition to list
description: Suggest an addition to this list.
title: '🎉 Add <App Name>'
labels: ['addition']
body:
- type: markdown
attributes:
value: |
NOTE: Each discrete (stand-alone) request should be in its own issue.
- type: textarea
attributes:
label: 🪩 Provide a link to the proposed addition
description: Place link here.
placeholder: |
https://github.com/jaywcjlove/awesome-mac
https://github.com/jaywcjlove/awesome-mac
https://github.com/jaywcjlove/awesome-mac
validations:
required: true

- type: textarea
attributes:
label: 😳 Explain why it should be added
description: A clear and concise description of why it should be added to this list.
validations:
required: true

- type: textarea
attributes:
label: 📖 Additional context
description: Add any other context or screenshots about the feature request here.


- type: checkboxes
attributes:
label: 🧨 Issue Checklist
description: Put an x in the boxes once you've completed each step. You can also fill these out after creating the issue. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before responding to the issue.
options:
- label: I have checked for other similar issues
- label: I have explained why this change is important
- label: I have added necessary documentation (if appropriate)
validations:
required: true
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/REMOVE_ITEM_FROM_LIST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 🗑 Removal from list
description: Suggest a removal from this list.
title: '🗑 Remove <App Name>'
labels: ['removal']
body:
- type: markdown
attributes:
value: |
NOTE: Each discrete (stand-alone) request should be in its own issue.
- type: textarea
attributes:
label: 😳 Explain why it should be removed
description: A clear and concise description of why it should be removed from this list.
validations:
required: true

- type: textarea
attributes:
label: 📖 Additional context
description: Add any other context or screenshots about the feature request here.
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 🐞 Bug Report
description: File a report when something goes wrong so it can get fixed!
title: '🐞 Bug Report: xxx.md'
labels: ['bug']
body:
- type: markdown
attributes:
value: |
NOTE: Each discrete (stand-alone) request should be in its own issue.
- type: textarea
attributes:
label: 🐞 Describe the bug
description: A clear and concise description of what the bug is.
placeholder: ex. xxxx
validations:
required: true

- type: markdown
attributes:
value: |
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
- type: textarea
attributes:
label: 📖 Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: ex. xxxx
validations:
required: true

- type: textarea
attributes:
label: 🌅 Screenshots
description: If applicable, add screenshots to help explain your problem.
placeholder: ex. xxxx
validations:
required: true

- type: input
attributes:
label: "💻 Desktop"
placeholder: ex. `MacOS 13.0.1`
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐝 Feature request
description: Suggest a feature for this project
title: '🐝 Feature request'
labels: ['help wanted']
body:
- type: markdown
attributes:
value: |
NOTE: Each discrete (stand-alone) request should be in its own issue.
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is.
placeholder: Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.

- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.

- type: textarea
attributes:
label: 📖 Additional contex
description: Add any other context or screenshots about the feature request here.


- type: checkboxes
attributes:
label: 🧨 Issue Checklist
description: Put an x in the boxes once you've completed each step. You can also fill these out after creating the issue. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before responding to the issue.
options:
- label: I have checked for other similar issues
- label: I have explained why this change is important
- label: I have added necessary documentation (if appropriate)
validations:
required: true
130 changes: 130 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
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@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- run: npm install
- run: npm run build
- run: npm run create:ast

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
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@main
with:
package-path: ./package.json

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@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: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
name: ${{ steps.create_tag.outputs.version }}
tag: ${{ steps.create_tag.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/awesome-mac@${{steps.create_tag.outputs.versionNumber}}/file/README.md) [![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/awesome-mac?logo=docker)](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
```
## 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 install @jsdevtools/npm-publish -g
- run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json

- run: npm publish --access public --provenance
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# Create Docker Image
- name: Docker login
if: steps.create_tag.outputs.successful
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ 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 ${{ secrets.DOCKER_USER }}/awesome-mac:latest
docker push ${{ secrets.DOCKER_USER }}/awesome-mac:latest
- name: Tags & Push image
if: steps.create_tag.outputs.successful
run: |
echo "outputs.tag - ${{ steps.changelog.outputs.version }}"
docker tag awesome-mac ${{ secrets.DOCKER_USER }}/awesome-mac:${{steps.changelog.outputs.version}}
docker push ${{ secrets.DOCKER_USER }}/awesome-mac:${{steps.changelog.outputs.version}}
# Create Docker Image in GitHub
# - name: Login to GitHub registry
# run: echo ${{ github.token }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin

# - name: Build docker image
# run: docker build -t ghcr.io/jaywcjlove/awesome-mac:latest .

# - name: Publish to GitHub registry
# run: docker push ghcr.io/jaywcjlove/awesome-mac:latest

# - name: Tag docker image (beta) and publish to GitHub registry
# if: steps.create_tag.outputs.successful
# run: |
# echo "version: v${{ steps.changelog.outputs.version }}"
# docker tag ghcr.io/jaywcjlove/awesome-mac:latest ghcr.io/jaywcjlove/awesome-mac:${{steps.changelog.outputs.version}}
# docker push ghcr.io/jaywcjlove/awesome-mac:${{steps.changelog.outputs.version}}
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
.deploy/
node_modules/
dist/*.html
dist/*.json
dist
npm-debug.log*
package-lock.json

.DS_Store
.cache
.rdoc-dist
.vscode

*.bak
*.tem
*.temp
#.swp
*.*~
~*.*
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: ruby
rvm: 2.4.1
before_script: gem install awesome_bot
script: awesome_bot *.md --allow 301,302
Loading

0 comments on commit be363c9

Please sign in to comment.