Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwDayDream authored Jun 17, 2024
0 parents commit 47759bf
Show file tree
Hide file tree
Showing 11 changed files with 1,537 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Code Owners - Append new owners here
* @wwwDayDream

# This should stay
.github/ @wwwDayDream
LICENSE @wwwDayDream
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/1-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 📙 Feature Request
description: Request a feature that doesn't exist
title: "[REQUEST] <title>"
labels: []
body:
- type: checkboxes
attributes:
label: Is there an feature request similar to this?
description: Please search to see if your request is similar enough to others that you could comment there.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Is your feature request related to an existing issue?
description: A link to any existing issues.
validations:
required: false
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: false
- type: textarea
attributes:
label: Describe alternatives you've considered
description: Any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the feature you are requesting!
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/2-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: 🐞 Bug
description: File a bug/issue
title: "[BUG] <title>"
labels: []
body:
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Community Discord
url: https://discord.gg/Mherqbcmep
about: Please ask and answer questions here before creating an issue if you're unsure.
56 changes: 56 additions & 0 deletions .github/workflows/action-distribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Automatic Distribution

on:
push:
branches:
- main

jobs:
check-diff:
runs-on: ubuntu-latest
if: ${{ !github.event.repository.is_template }}
outputs:
INDEX_CHANGED: ${{ steps.filter.outputs.index }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
base: main
filters: |
index:
- 'index.js'
release-dist:
runs-on: ubuntu-latest
needs: check-diff
if: ${{ needs.check-diff.outputs.INDEX_CHANGED == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- uses: reecetech/[email protected]
id: version
with:
scheme: calver

- name: Add Node Modules and Push
env:
checkout_branch: v${{ steps.version.outputs.major-version }}.${{ steps.version.outputs.minor-version }}.x
GH_TOKEN: ${{ github.token }}
run: |
git checkout ${{ env.checkout_branch }} 2>/dev/null || git checkout -b ${{ env.checkout_branch }}
git merge -X theirs ${{ github.event.repository.default_branch }}
npm install
git add ./node_modules -f
git commit -am "Push node modules"
git tag ${{ steps.version.outputs.version }}
git push -f --set-upstream origin ${{ env.checkout_branch }}
git push origin tag ${{ steps.version.outputs.version }}
echo '🚀 Released v${{ steps.version.outputs.version }} @ ${{ github.event.repository.full_name }}/${{ env.checkout_branch }}' >> $GITHUB_STEP_SUMMARY
73 changes: 73 additions & 0 deletions .github/workflows/action-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Setup Javascript Action

on:
workflow_dispatch:
push:
branches:
- '**'

jobs:
make-pr:
name: Create & PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- uses: 1arp/[email protected]
with:
file: action.yml
content: |
name: '${{ github.event.repository.name }}'
description: "${{ github.event.repository.description }}"
inputs:
token:
description: 'The token to use.'
require: false
default: ${{ '${{ github.token }}' }}
runs:
using: 'node20'
main: 'index.js'
- uses: 1arp/[email protected]
with:
file: index.js
content: |
const core = require('@actions/core');
const github = require('@actions/github');
(async() => {
const octokit = github.getOctokit(core.getInput('token'));
})();
- run: |
npm init -y
npm install @actions/core
npm install @actions/github
- name: GitHub PR
env:
GH_TOKEN: ${{ github.token }}
run: |
git add .
git checkout -b added/initial/action-setup
git commit -am "Setup basic Javascript action"
git push --set-upstream origin added/initial/action-setup
gh pr create --base ${{ github.event.repository.default_branch }} --head added/initial/action-setup --title "Setup basic Javascript action" --body "" || echo "PR already exists or another error occurred"
one-time:
name: Execute One Time
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Disable Workflow
run: |
gh workflow disable -R $GITHUB_REPOSITORY "${{ github.workflow }}"
Loading

0 comments on commit 47759bf

Please sign in to comment.