Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
101 lines (98 loc) · 4.27 KB
/
Copy pathaction.yml
File metadata and controls
101 lines (98 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Julia release checks
description: Checks a pull request of a Julia package under gitflow, OneFlow or trunk, with the ReleaseFlow package in ReleaseFlow/ at this action's own version.
# Every input reaches the script through the environment, never the shell, so that a crafted branch name can't run commands.
inputs:
check:
description: The check to run, `source`, `version`, `changelog`, `breaking`, `entry` or `is-release`, or `prepare`, which prepares a release.
required: true
model:
description: The branching model, `gitflow`, `oneflow` or `trunk`.
default: gitflow
main-branch:
description: The branch of releases.
default: main
develop-branch:
description: The branch of unreleased work, for gitflow.
default: develop
head-ref:
description: The branch that the pull request comes from.
default: ${{ github.head_ref }}
head-sha:
description: The pull request's head commit.
default: ${{ github.event.pull_request.head.sha }}
base-branch:
description: The branch that the pull request merges into.
default: ${{ github.base_ref }}
base-ref:
description: What the pull request merges into, as git names it; `origin/<base-branch>` if empty.
default: ''
skip-label:
description: The label that exempts a pull request from the changelog entry.
default: skip changelog
check-links:
description: Whether to check the changelog's comparison links.
default: 'true'
project:
description: The package's directory, relative to the repository's root, for a package in a subdirectory.
default: ''
registry:
description: The registry whose records give the commits of releases.
default: General
kind:
description: For `prepare`, the kind of release, `release` or `hotfix`.
default: release
step:
description: For `prepare`, the step of the version, `auto`, `patch`, `minor` or `major`.
default: auto
date:
description: For `prepare`, the date of the release's section; today, in UTC, if empty.
default: ''
pin-action:
description: 'For `prepare`, an action, such as `BioJulia/Workflows`, whose `uses: …@vX.Y.Z` pins in the workflows take the new version.'
default: ''
outputs:
release:
description: For the `is-release` check, whether the pull request is a release, `true` or `false`.
value: ${{ steps.check.outputs.release }}
version:
description: For `prepare`, the version of the prepared release.
value: ${{ steps.check.outputs.version }}
branch:
description: For `prepare`, the branch of the prepared release, `release/vX.Y.Z` or `hotfix/vX.Y.Z`.
value: ${{ steps.check.outputs.branch }}
base:
description: For `prepare`, the branch that the prepared release merges into.
value: ${{ steps.check.outputs.base }}
notes:
description: For `prepare`, the prepared release's section of the changelog.
value: ${{ steps.check.outputs.notes }}
runs:
using: composite
steps:
- uses: julia-actions/setup-julia@da908477b5db94c10ffce8cfea9f2b3b9d5db687 # v3.0.3
with:
version: '1'
- id: check
shell: bash
env:
CHECK: ${{ inputs.check }}
RELEASEFLOW_MODEL: ${{ inputs.model }}
RELEASEFLOW_MAIN_BRANCH: ${{ inputs.main-branch }}
RELEASEFLOW_DEVELOP_BRANCH: ${{ inputs.develop-branch }}
RELEASEFLOW_HEAD_REF: ${{ inputs.head-ref }}
RELEASEFLOW_HEAD_SHA: ${{ inputs.head-sha }}
RELEASEFLOW_BASE_BRANCH: ${{ inputs.base-branch }}
BASE_REF_INPUT: ${{ inputs.base-ref }}
RELEASEFLOW_SKIP_LABEL: ${{ inputs.skip-label }}
RELEASEFLOW_SKIP_CHANGELOG: ${{ contains(github.event.pull_request.labels.*.name, inputs.skip-label) }}
RELEASEFLOW_CHECK_LINKS: ${{ inputs.check-links }}
RELEASEFLOW_PROJECT: ${{ inputs.project }}
RELEASEFLOW_REGISTRY: ${{ inputs.registry }}
RELEASEFLOW_KIND: ${{ inputs.kind }}
RELEASEFLOW_STEP: ${{ inputs.step }}
RELEASEFLOW_DATE: ${{ inputs.date }}
RELEASEFLOW_PIN_ACTION: ${{ inputs.pin-action }}
run: |
export RELEASEFLOW_BASE_REF="${BASE_REF_INPUT:-origin/$RELEASEFLOW_BASE_BRANCH}"
export RELEASEFLOW_DEVELOP_REF="origin/$RELEASEFLOW_DEVELOP_BRANCH"
julia --startup-file=no --project="$GITHUB_ACTION_PATH/ReleaseFlow" -m ReleaseFlow "$CHECK"