Skip to content

Commit

Permalink
Add more shorter instructions to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Skenvy committed Oct 31, 2023
1 parent d2eb655 commit ab3cf85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# [julia-release](https://github.com/Skenvy/julia-release)
[![Test](https://github.com/Skenvy/julia-release/actions/workflows/main.yaml/badge.svg?branch=main&event=push)](https://github.com/Skenvy/julia-release/actions/workflows/main.yaml)

An action to proctor the CD (release and registering) of a julia project.
An action to proctor the CD (release and registering) of a julia project. Use the action to automate the detection of an update to the `version` in your `Project.toml`, and from that, automate the creation of a GitHub release and the [Registrator](https://github.com/JuliaRegistries/Registrator.jl) comment on the commit tagged by that release.
```yaml
- name: Julia 🔴🟢🟣 Release 🚰 and Register 📦
uses: Skenvy/julia-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
#
A github action to automate the release and registration of a Julia package (via the [Registrator](https://github.com/JuliaRegistries/Registrator.jl) bot, so will [require it to be installed](https://github.com/apps/juliateam-registrator/installations/new)). It will detect any commit to a designated deployment branch that updates the project version in the required `Project.toml`, and create a release and registration for it.
A github action to automate the release and registration of a Julia package (via the [Registrator](https://github.com/JuliaRegistries/Registrator.jl) bot, so will [require it to be installed](https://github.com/apps/juliateam-registrator/installations/new)).
It will detect any commit to a designated `deployment_branch` that updates the project version in the required `<subdirectory>/Project.toml`, and create a release and registration for it.

This is the ideological reverse order of the standard [julia TagBot](https://github.com/JuliaRegistries/TagBot), which creates github releases of commits after _manually_ registering them. Instead, this action, when set up in the recommended way, will, if it detects a change to the `version`, create a release, and comment the `"@JuliaRegistrator register"` command on the commit that it has released, for a _truly continuous_ **deployment strategy**; **_CD_**.
#
Expand Down Expand Up @@ -112,6 +120,7 @@ runs-on: 'ubuntu-latest' # docker jobs not supported on windows or mac
```
#
## A full example
The motivation in making this was to simplify the CI steps to not have to manually summon the registrator bot and not have to rely on the tagbot to create releases after after commenting the registrator bot to "release" them. See it used below in a minimal example, or see it used in the place it was originally designed for [here](https://github.com/Skenvy/Collatz/blob/main/.github/workflows/julia-build.yaml), and the test working that calls [here](https://github.com/Skenvy/Collatz/blob/main/.github/workflows/julia-test.yaml).
### The CD workflow ~ `./.github/workflows/julia-build.yaml`
* For a deployment branch `main`, with a project in a subdir `subdir`.
* Assumes the existence of a `./.github/workflows/julia-test.yaml`
Expand Down
3 changes: 2 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ branding:
inputs:
deployment_branch:
description: 'Name of branch from which against to deploy; e.g. master|main|trunk|other'
required: true
required: false
default: 'main'
subdirectory:
description: "The path to the folder/subdirectory containing the Pkg's Project.toml"
required: false
Expand Down

0 comments on commit ab3cf85

Please sign in to comment.