Skip to content

Commit

Permalink
Merge pull request #10 from thomaseizinger/release/1.1.0
Browse files Browse the repository at this point in the history
Release version 1.1.0
  • Loading branch information
thomaseizinger authored Feb 17, 2020
2 parents a78e166 + 15de157 commit 109f759
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: git checkout -b release/${{ env.RELEASE_VERSION }}

- name: Update changelog
uses: thomaseizinger/keep-a-changelog-new-release@master
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0
with:
version: ${{ env.RELEASE_VERSION }}

Expand All @@ -44,7 +44,7 @@ jobs:
run: git push origin release/${{ env.RELEASE_VERSION }}

- name: Create pull request
uses: thomaseizinger/create-pull-request@v1
uses: thomaseizinger/create-pull-request@1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/${{ env.RELEASE_VERSION }}
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "Publish new release"

on:
pull_request:
branches:
- master
types:
- closed

jobs:
release:
name: Publish new release
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true # only merged pull requests must trigger this job
steps:
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "::set-env name=RELEASE_VERSION::$VERSION"
- name: Extract version from branch name (for hotfix branches)
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#hotfix/}
echo "::set-env name=RELEASE_VERSION::$VERSION"
- name: Create Release
uses: fleskesvor/create-release@feature/support-target-commitish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: ${{ github.event.pull_request.merge_commit_sha }}
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}

- name: Merge release into dev branch
uses: thomaseizinger/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/${{ env.RELEASE_VERSION }}
base: dev
title: Merge release ${{ env.RELEASE_VERSION }} into dev branch
reviewers: ${{ github.event.pull_request.user.login }}

# if needed, you can checkout the latest master here, build artifacts and publish / deploy them somewhere
28 changes: 0 additions & 28 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node
node_js: 12

branches:
only:
- release/*
- /^release\/.*$/
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.0] - 2020-02-17

### Added

- GitHub action to backport releases to dev branch

### Fixed

- Merge commit is used to tag release instead of last commit on release branch

## [1.0.0] - 2020-02-15

### Added

- Everything since the beginning!

[Unreleased]: https://github.com/thomaseizinger/github-action-gitflow-release-workflow/compare/1.0.0...HEAD
[Unreleased]: https://github.com/thomaseizinger/github-action-gitflow-release-workflow/compare/1.1.0...HEAD

[1.1.0]: https://github.com/thomaseizinger/github-action-gitflow-release-workflow/compare/1.0.0...1.1.0

[1.0.0]: https://github.com/thomaseizinger/github-action-gitflow-release-workflow/compare/794c3ba521cae6b168def8bdbfe1aa6a2c285257...1.0.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-action-gitflow-release-workflow",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",
"author": "Thomas Eizinger <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit 109f759

Please sign in to comment.