Skip to content

Commit

Permalink
Merge branch 'v1.x' into working-directory
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Lespinasse <[email protected]>
  • Loading branch information
rlespinasse authored Oct 26, 2024
2 parents 0ac8785 + 207a9dd commit 4c41913
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 7 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
1 change: 1 addition & 0 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
uses: github/super-linter@v7
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
DEFAULT_BRANCH: v1.x
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 7 additions & 1 deletion .github/workflows/release-that.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Release that
on: [push, pull_request]
on:
push:
branches:
- "*"
tags-ignore:
- "*"
pull_request:
permissions: read-all
jobs:
os-testing:
Expand Down
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# How to contribute to Release That

## Did you find a bug

* **Do not open up a GitHub issue if the bug is a security vulnerability**, and instead to refer to our [security policy][1].

* **Ensure the bug was not already reported** by searching on GitHub under [Issues][2].

* If you're unable to find an open issue addressing the problem, [open a 'Bug' issue][4].
Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring.

## Did you write a patch that fixes a bug

* Open a new GitHub pull request with the patch.

* Ensure the PR description clearly describes the problem and solution.
Include the relevant issue number if applicable.

## Do you intend to add a new feature or change an existing one

* Suggest your change by [opening a 'Feature request' issue][5]

## Do you have questions about the source code

* [open an issue][3] with your question.

Thanks!

[1]: https://github.com/rlespinasse/release-that/security/policy
[2]: https://github.com/rlespinasse/release-that/issues
[3]: https://github.com/rlespinasse/release-that/issues/new
[4]: https://github.com/rlespinasse/release-that/issues/new?assignees=&labels=bug&template=bug_report.md&title=
[5]: https://github.com/rlespinasse/release-that/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=
22 changes: 22 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Security Policy

## Supported Versions and Branches

| Version | Supported | End of Support | Branch | Specific Tags |
| ------- | ------------------ | -------------- | ------ | ------------- |
| 1.x | :white_check_mark: | | v1.x | v1 |

A GitHub repository can use one of the available branches as an action inside its workflows.

### End of Life of a branch

Since `2024-10-26`, when a new major version is released,

- The previous one will continue to receive security patches for 3 months,
- After the 3 months, the branch is deleted, and only the tags remain.

## Reporting a Vulnerability

In this project, you can report a Vulnerability by creating a [draft security advisory](https://github.com/rlespinasse/release-that/security/advisories).

If the vulnerability is confirmed, a fix will be produced and the advisory will be published.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ runs:
# Setup steps
- name: Enhance GitHub context
uses: rlespinasse/github-slug-action@v4
with:
prefix: RT_
- name: Prepare working directory slug data
id: working-directory-slug
uses: rlespinasse/slugify-value@v1
Expand All @@ -78,6 +80,8 @@ runs:
INPUT_WORKINGDIRECTORY: ${{ inputs.working-directory }}
INPUT_WORKINGDIRECTORYSLUG: ${{ steps.working-directory-slug.outputs.slug }}
INPUT_WITHOUTPREFIX: ${{ inputs.without-prefix }}
REPOSITORY_NAME: ${{ env.RT_GITHUB_REPOSITORY_NAME_PART }}
REF_POINT: ${{ env.RT_GITHUB_REF_NAME }}

# Main step
- name: Semantic Release
Expand Down
17 changes: 11 additions & 6 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -z "$GITHUB_ACTION_PATH" ]; then
fi

PACKAGE_CONFIG_PATH=.
PACKAGE_NAME="${GITHUB_REPOSITORY_NAME_PART}"
PACKAGE_NAME="${REPOSITORY_NAME}"
if [ -n "$INPUT_WORKINGDIRECTORY" ]; then
PACKAGE_CONFIG_PATH="$INPUT_WORKINGDIRECTORY"
PACKAGE_NAME="$INPUT_WORKINGDIRECTORYSLUG"
Expand All @@ -23,7 +23,7 @@ elif [ "${INPUT_WITHOUTPREFIX}" == "true" ]; then
TAG_FORMAT="\${version}"
fi

echo "+ Create package.json file"
echo "Create package.json file"
cat <<EOF >"$PACKAGE_CONFIG_PATH/package.json"
{
"name": "${PACKAGE_NAME}",
Expand All @@ -40,11 +40,16 @@ cat <<EOF >"$PACKAGE_CONFIG_PATH/package.json"
EOF

if [ "${INPUT_DRYRUN}" == "true" ]; then
echo "+ Setup current branch as releasable (dry-run mode)"
# shellcheck disable=SC2094
cat <<<"$(jq --arg branch "${GITHUB_REF_NAME}" '.release += {branches: [$branch]}' "$PACKAGE_CONFIG_PATH/package.json")" >"$PACKAGE_CONFIG_PATH/package.json"
if [ -n "${REF_POINT}" ]; then
echo " - Setup current branch as releasable (dry-run mode)"
# shellcheck disable=SC2094
cat <<<"$(jq --arg branch "${REF_POINT}" '.release += {branches: [$branch]}' "$PACKAGE_CONFIG_PATH/package.json")" >"$PACKAGE_CONFIG_PATH/package.json"
else
echo " Fallback to releasable branches since not current branch is found (dry-run mode)"
cat <<<"$(jq --argjson branches "$(<"${GITHUB_ACTION_PATH}"/branches.json)" '.release += {branches: $branches}' "$PACKAGE_CONFIG_PATH/package.json")" >"$PACKAGE_CONFIG_PATH/package.json"
fi
else
echo "+ Setup releasable branches"
echo " - Setup releasable branches"
# shellcheck disable=SC2094
cat <<<"$(jq --argjson branches "$(<"${GITHUB_ACTION_PATH}/branches.json")" '.release += {branches: $branches}' "$PACKAGE_CONFIG_PATH/package.json")" >"$PACKAGE_CONFIG_PATH/package.json"
fi

0 comments on commit 4c41913

Please sign in to comment.