diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..7252dae --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @Alorel diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..e0e2e76 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,6 @@ +# These are supported funding model platforms + +github: + - Alorel +custom: + - "https://paypal.me/alorel" diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml new file mode 100644 index 0000000..ac90efd --- /dev/null +++ b/.github/actions/release/action.yml @@ -0,0 +1,74 @@ +name: Release +description: Releases changes to the branch +inputs: + changelog: + description: changelog + required: true + major: + required: true + description: major version + minor: + required: true + description: minor version + patch: + required: true + description: patch version + issues-closed: + description: Issues closed by the release +runs: + using: composite + steps: + - uses: ./ + name: Identity + + - shell: bash + run: git tag v${{ inputs.major }} --force + + - shell: bash + run: git tag v${{ inputs.major }}.${{ inputs.minor }} --force + + - shell: bash + run: git tag v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }} + + - shell: bash + run: git push + + - shell: bash + run: git push --tags --force + + - uses: ncipollo/release-action@v1 + with: + allowUpdates: true + prerelease: false + generateReleaseNotes: false + makeLatest: false + commit: ${{ github.sha }} + body: Alias for `v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }}` + tag: v${{ inputs.major }} + + - uses: ncipollo/release-action@v1 + with: + allowUpdates: true + prerelease: false + generateReleaseNotes: false + makeLatest: false + commit: ${{ github.sha }} + body: Alias for `v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }}` + tag: v${{ inputs.major }}.${{ inputs.minor }} + + - uses: ncipollo/release-action@v1 + with: + allowUpdates: false + prerelease: false + generateReleaseNotes: false + commit: ${{ github.sha }} + body: ${{ inputs.changelog }} + tag: v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }} + + - name: Notify + if: ${{ inputs.issues-closed }} + uses: ./dist/notify + with: + allow-out-of-sync: true + tag: v${{ inputs.major }}.${{ inputs.minor }}.${{ inputs.patch }} + issues: ${{ inputs.issues-closed }} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4d760e5 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + commit-message: + prefix: deps + prefix-development: "deps(dev)" + ignore: + - dependency-name: "*" + update-types: + - version-update:semver-minor + - version-update:semver-patch diff --git a/.github/semantic.yml b/.github/semantic.yml new file mode 100644 index 0000000..3c972e7 --- /dev/null +++ b/.github/semantic.yml @@ -0,0 +1,21 @@ +# https://github.com/Ezard/semantic-prs + +enabled: true +commitsOnly: true +types: + - feat + - fix + - docs + - refactor + - build + - ci + - chore + - deps +scopes: + - dev + - generate-changelog + - last-tag + - next-tag + - notify + - sync-check + - core diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0d36255 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Release +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +permissions: + contents: write + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + - name: Parse + id: parse + uses: alorel-actions/semantic-release-lite@v0 + with: + minor-types: | + feat: Features + patch-types: | + fix: Bug Fixes + trivial-types: | + chore: Maintenance + deps: Dependency updates + ci: CI & Build + build: CI & Build + refactor: Refactors + docs: Documentation + + - name: Release + uses: ./.github/actions/release + if: ${{ steps.parse.outputs.should-release && github.ref == 'refs/heads/master' }} + with: + major: ${{ steps.parse.outputs.next-version-major }} + minor: ${{ steps.parse.outputs.next-version-minor }} + patch: ${{ steps.parse.outputs.next-version-patch }} + changelog: ${{ steps.parse.outputs.changelog }} + issues-closed: ${{ steps.parse.outputs.issues-closed }} diff --git a/README.md b/README.md new file mode 100644 index 0000000..17d272e --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +Quick shortcut action for authenticating as the GitHub Actions bot through `git config`. + +# Inputs + +- **working-directory** (default: current): run `git config` in the specified directory +- **global** (default: false): run `git config --global` instead of `git config` diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..1f91ee7 --- /dev/null +++ b/action.yml @@ -0,0 +1,21 @@ +name: GitHub Actions Bot git auth +description: Quick shortcut action for authenticating as the GitHub Actions bot through `git config`. +inputs: + working-directory: + description: run git config in the specified directory + global: + description: run git config --global instead of git config +runs: + using: composite + steps: + - shell: bash + if: ${{ inputs.global == 'true' || inputs.global == 'TRUE' }} + run: > + git config --global user.email 'github-actions[bot]@users.noreply.github.com' && + git config --global user.name 'github-actions[bot]' + - shell: bash + if: ${{ inputs.global != 'true' && inputs.global != 'TRUE' }} + working-directory: ${{ inputs.working-directory }} + run: > + git config user.email 'github-actions[bot]@users.noreply.github.com' && + git config user.name 'github-actions[bot]'