-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
7,495 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# These are supported funding model platforms | ||
|
||
github: | ||
- Alorel | ||
custom: | ||
- "https://paypal.me/alorel" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
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: alorel-actions/git-ident@v1 | ||
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 --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 }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# 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 | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: deps | ||
prefix-development: "deps(dev)" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: | ||
- version-update:semver-minor | ||
- version-update:semver-patch |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Core | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
release: | ||
name: Changelog & Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
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 | ||
deps: Dependency updates | ||
perf: Performance | ||
trivial-types: | | ||
chore: Maintenance | ||
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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Installs a global `cargo` dependency if it isn't already installed. | ||
|
||
# Inputs | ||
|
||
- **name** (required): Package to install | ||
- **version**: Version to install, defaults to latest | ||
- **release**: Boolean, set to true to install a release version instead of debug | ||
- **force-version**: Boolean, set to true to force the given version if a different version is installed |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Cargo global dependency | ||
description: Install a global cargo dependency with `cargo install` | ||
inputs: | ||
name: | ||
required: true | ||
description: Package name | ||
version: | ||
description: Version to install. Defaults to latest | ||
release: | ||
description: Install release version instead of debug | ||
default: 'false' | ||
force-version: | ||
description: Force the given version if a different version is installed | ||
default: 'false' | ||
runs: | ||
using: node20 | ||
main: index.js |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
const {getInput, getBooleanInput, setFailed, info, notice} = require('@actions/core'); | ||
const {spawnSync} = require('node:child_process'); | ||
|
||
try { | ||
const name = getInput('name', {required: true}); | ||
const version = getInput('version'); | ||
const release = getBooleanInput('release'); | ||
|
||
const alreadyInstalled = getInstalledVersion(name); | ||
|
||
if (version && alreadyInstalled && alreadyInstalled === version) { | ||
info(`Already installed ${name}@${alreadyInstalled}`); | ||
return; | ||
} | ||
|
||
const args = ['install', name]; | ||
if (version) { | ||
args.push('--version', version); | ||
} | ||
|
||
if (!release) { | ||
args.push('--debug'); | ||
} | ||
|
||
if (alreadyInstalled) { | ||
notice(`Upgrading ${name}@${alreadyInstalled} to ${version}`); | ||
|
||
args.push('--force'); | ||
} | ||
|
||
const res = spawnSync('cargo', args, { | ||
env: process.env, | ||
stdio: 'inherit', | ||
}); | ||
if (res.status === 0) { | ||
info(`Installed ${name}@${version}`); | ||
} else { | ||
setFailed(`Failed to install ${name}@${version}`); | ||
} | ||
} catch (e) { | ||
setFailed(e); | ||
} | ||
|
||
function getInstalledVersion(pkg) { | ||
let app; | ||
const args = ['--version']; | ||
if (pkg.match(/^cargo-[\w-_]+$/)) { | ||
app = 'cargo'; | ||
args.unshift(pkg.slice('cargo-'.length)); | ||
} else { | ||
app = pkg; | ||
} | ||
|
||
const res = spawnSync(app, args, { | ||
encoding: 'utf8', | ||
env: process.env, | ||
stdio: ['ignore', 'pipe', 'inherit'], | ||
}); | ||
|
||
if (res.status !== 0) { | ||
return; | ||
} | ||
|
||
return res.stdout.match(/\d+\.\d+\.\d+(-\w+\.\d+)?/)?.[0]; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.