Public portion of the shared Box ID GitHub Actions & Workflows which can be referenced by public repositories.
To use the workflows in your repository, reference them directly in an action step through using.
Generic Example
name: Example Workflow
on: [push]
jobs:
example:
runs-on: ubuntu-latest
steps:
- name: Run reusable action
uses: box-id/github-actions-oss/.github/workflows/reusable_action@main
with:
input_1: value_1This workflow creates a PR for a version bump and collects a changelog for Elixir projects.
- A file
./.github/changelog-config.jsonmust exist in the repository. This file can be copied and adjusted from here
Note: This workflow supports repositories at any stage:
- With GitHub releases: Uses the latest release as the baseline and increments based on PR labels
- With git tags only: Falls back to the latest version tag matching the configured prefix and increments based on PR labels
- Fresh repositories: Creates the first release as version 1.0.0 (ignores PR labels for the initial release)
branch: The branch to release from (default:main)version-prefix: The prefix to use for version tags (default:v)
name: 👉 Trigger Version Release
on:
workflow_dispatch:
jobs:
create_version_bump_pr:
name: Create Version Bump PR
uses: box-id/github-actions-oss/.github/workflows/elixir_version_bump.yml@main
with:
version-prefix: "v" # optional, defaults to "v"
secrets: inheritThis workflow creates a GitHub release and optionally publishes an Elixir package to Hex.pm.
If the workflow detects no change between the version in mix.exs and the last-published GitHub release, it will
not create a release and publish to Hex.
branch: The branch to release from (default:main)publish-to-hex: Whether to publish the package to hex.pm (default:false)elixir-version-file: The Elixir version file (only forpublish-to-hex = true, default:.tool-versions)version-prefix: The prefix to use for version tags (default:v)
HEX_API_KEY: Required whenpublish-to-hexistrue
name: 🔩 Publish Release (Auto)
on:
push:
branches:
- main
paths:
- "mix.exs"
jobs:
release:
name: Publish a release
uses: box-id/github-actions-oss/.github/workflows/elixir_publish_release.yml@main
with:
publish-to-hex: true
version-prefix: "v" # optional, defaults to "v"
secrets: inheritThis workflow creates a PR for a version bump and collects a changelog.
- A file
./.github/changelog-config.jsonmust exist in the repository. This file can be copied and adjusted from here
Note: This workflow supports repositories at any stage:
- With GitHub releases: Uses the latest release as the baseline and increments based on PR labels
- With git tags only: Falls back to the latest version tag matching the configured prefix and increments based on PR labels
- Fresh repositories: Creates the first release as version 1.0.0 (ignores PR labels for the initial release)
branch: The branch to release from (default:main)version-prefix: The prefix to use for version tags (default:v)
name: 👉 Trigger Version Release
on:
workflow_dispatch:
jobs:
create_version_bump_pr:
name: Create Version Bump PR
uses: box-id/github-actions-oss/.github/workflows/npm_version_bump.yml@main
with:
version-prefix: "v" # optional, defaults to "v"
secrets: inheritThis workflow creates a GitHub release and publishes the package to NPM.
If the workflow detects no change between the version in package.json and the last-published GitHub release, it will
not create a release and publish to NPM.
branch: The branch to release from (default:main)version-prefix: The prefix to use for version tags (default:v)
name: 🔩 Publish Release (Auto)
on:
push:
branches:
- main
paths:
- "package.json"
jobs:
release:
name: Publish a release
uses: box-id/github-actions-oss/.github/workflows/npm_publish_release.yml@main
with:
version-prefix: "v" # optional, defaults to "v"
secrets: inherit