generated from actions/typescript-action
-
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.
Merge pull request #141 from geoadmin/develop
New Release v1.3.0 - #minor
- Loading branch information
Showing
3 changed files
with
5 additions
and
106 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/[email protected] | ||
|
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 |
---|---|---|
|
@@ -20,106 +20,5 @@ on: | |
- edited | ||
|
||
jobs: | ||
pr-release-title: | ||
name: Set PR title | ||
runs-on: ubuntu-latest | ||
if: ${{ github.base_ref == 'master' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: master | ||
|
||
# This step is needed in order for the anothrNick/[email protected] action to work properly | ||
- name: Do the merge but don't push it | ||
run: | | ||
cd ${GITHUB_WORKSPACE} | ||
git config user.email "[email protected]" | ||
git config user.name "Github PR Auto Title Workflow" | ||
git fetch origin ${{ github.head_ref }}:${{ github.head_ref }} | ||
git merge ${{ github.head_ref }} --no-ff | ||
- name: Get PR Infos | ||
id: pr_infos | ||
uses: Brymastr/pr-info-action@v1 | ||
|
||
- name: Get Bump Type and PR Title | ||
id: bump_type | ||
run: | | ||
bump_type=minor | ||
echo "Set Bump Type default to ${bump_type}" | ||
# Set default bump type for hotfixes | ||
case "${{ github.head_ref }}" in | ||
hotfix-* | bugfix-* | bug-*) | ||
bump_type=patch | ||
echo "Hotfix detected set default bump to ${bump_type}" | ||
;; | ||
feat-* | feature-*) | ||
bump_type=minor | ||
echo "Hotfix detected set default bump to ${bump_type}" | ||
;; | ||
esac | ||
echo "Set bump type based on PR infos" | ||
case "${{ steps.pr_infos.outputs.body }}" in | ||
*#major*) bump_type=major ;; | ||
*#minor*) bump_type=minor ;; | ||
*#patch*) bump_type=patch ;; | ||
esac | ||
case "${{ steps.pr_infos.outputs.title }}" in | ||
*#major*) bump_type=major ;; | ||
*#minor*) bump_type=minor ;; | ||
*#patch*) bump_type=patch ;; | ||
esac | ||
echo "::set-output name=bump::${bump_type}" | ||
echo "Bump type set to ${bump_type}" | ||
echo "Remove bump type from original title" | ||
pr_title="${{ steps.pr_infos.outputs.title }}" | ||
pr_title="${pr_title//[#]$bump_type/}" | ||
echo "::set-output name=pr_title::${pr_title}" | ||
- name: Bump version (without tagging) | ||
id: get_tag | ||
uses: anothrNick/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WITH_V: true | ||
DEFAULT_BUMP: ${{ steps.bump_type.outputs.bump }} | ||
RELEASE_BRANCHES: master | ||
TAG_CONTEXT: repo | ||
DRY_RUN: true | ||
|
||
- name: Set `New Release` PR title if needed | ||
if: ${{ github.head_ref == 'develop' }} | ||
uses: juztcode/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: "New Release ${{ steps.get_tag.outputs.new_tag }} - #${{ steps.bump_type.outputs.bump }}" | ||
body: ${{ steps.pr_infos.outputs.body }} | ||
|
||
- name: Set `Hotfix` PR title if needed | ||
if: ${{ github.head_ref != 'develop' }} | ||
uses: juztcode/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: "${{ steps.get_tag.outputs.new_tag }} - ${{ steps.bump_type.outputs.pr_title }} - #${{ steps.bump_type.outputs.bump }}" | ||
body: ${{ steps.pr_infos.outputs.body }} | ||
|
||
pr-labeler: | ||
name: Set PR label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: PR Auto Labeler | ||
uses: release-drafter/release-drafter@v5 | ||
with: | ||
config-name: release-drafter-labeler-config.yml | ||
disable-autolabeler: false | ||
disable-releaser: true | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
pr-edit: | ||
uses: geoadmin/.github/.github/workflows/pr-auto-semver.yml@master |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
build: # make sure build/ci work properly | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 12.x | ||
|
@@ -25,7 +25,7 @@ jobs: | |
test: # make sure the action works on a clean machine without building | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: ./ | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|