Skip to content

Commit

Permalink
Merge branch 'hotfix/3.1.0-alpha.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Dec 23, 2021
2 parents a849332 + f891533 commit 12dc7b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,18 @@ jobs:
- name: Prepare the changelog from the tag message
id: prepare_changelog
run: |
# Parse version
VERSION=${GITHUB_REF/refs\/tags\//}
echo "Setting release version to $VERSION"
echo "release_version=$VERSION" >> $GITHUB_ENV
echo "$GITHUB_REF"
echo "$GITHUB_REF_NAME"
echo "Setting release version to $GITHUB_REF_NAME"
PRERELEASE=false
# Check release type
if [[ $VERSION =~ 'alpha' || $VERSION =~ 'beta' ]]; then
if [[ $GITHUB_REF_NAME =~ 'alpha' || $GITHUB_REF_NAME =~ 'beta' ]]; then
echo "This is a prerelease."
PRERELEASE=true
fi
echo "is_prerelease=$PRERELEASE" >> $GITHUB_ENV
git show $GITHUB_REF
CHANGELOG=$(git show $GITHUB_REF | tail -n+7)
echo "Preparing changelog..."
CHANGELOG=$(git show $GITHUB_REF --no-patch --format='' | tail -n+6)
# Set markdown titles
CHANGELOG=${CHANGELOG/Added/## Added}
Expand All @@ -65,13 +58,16 @@ jobs:
# Remove PGP signature
CHANGELOG="${CHANGELOG%-----BEGIN*}"
echo "-----------------------------------------"
echo "$CHANGELOG"
# Change linebreaks and other special characters
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
CHANGELOG="${CHANGELOG//'%'/%25}"
CHANGELOG="${CHANGELOG//$'\n'/%0A}"
CHANGELOG="${CHANGELOG//$'\r'/%0D}"
echo "-----------------------------------------"
echo "Changelog prepared:"
echo $CHANGELOG
echo 'changelog<<EOF' >> $GITHUB_ENV
Expand All @@ -86,7 +82,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ env.release_version }}
release_name: v${{ github.ref_name }}
body: ${{ env.changelog }}
draft: false
prerelease: ${{ env.is_prerelease }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-root",
"version": "3.1.0-alpha.4",
"version": "3.1.0-alpha.5",
"private": true,
"type": "commonjs",
"workspaces": [
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config-demo",
"version": "3.1.0-alpha.4",
"version": "3.1.0-alpha.5",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@studiometa/webpack-config",
"version": "3.1.0-alpha.4",
"version": "3.1.0-alpha.5",
"description": "A basic webpack config",
"type": "module",
"main": "src/index.js",
Expand Down

0 comments on commit 12dc7b3

Please sign in to comment.