Skip to content

Commit

Permalink
Revert "Bump mindsers/changelog-reader-action from v1 to v2 (#41)" (#47)
Browse files Browse the repository at this point in the history
This reverts commit 5fd63c8.
  • Loading branch information
dangoslen authored Nov 23, 2020
1 parent 5fd63c8 commit c825ef5
Show file tree
Hide file tree
Showing 6 changed files with 26,347 additions and 7,050 deletions.
50 changes: 3 additions & 47 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,72 +6,28 @@ on:
jobs:
# unit tests
unit-tests:
if: "!contains(github.event.head_commit.author_name, 'GitHub Actions')"
if: "!contains(github.event.head_commit.author_name, 'GitHub Action')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: actions/checkout@v1
- run: npm install
- run: npm test
- run: npm run package
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Auto commit packaged action"

# test action works running from the graph
enforce-changelog:
needs: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- id: read-version
run: |
echo "::set-output name=version::$(cat VERSION)"
echo "::set-output name=version::$(cat ./VERSION)"
- uses: ./
with:
expectedLatestVersion: '${{ steps.read-version.outputs.version }}'

# test action works running from the graph
enforce-changelog-v2:
needs: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./

preview-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read version
id: read_version
run: |
echo ::set-output name=version::$(cat VERSION)
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.read_version.outputs.version }}
path: ./CHANGELOG.md
- name: Check for Release
id: check_release
run: |
TAG=$(git tag -l ${{ steps.read_version.outputs.version }})
MISSING=$([[ -z "$TAG" ]] && echo 'true' || echo 'false')
echo ::set-output name=missing::$MISSING
shell: bash
- name: Preview Changelog
if: ${{ steps.check_release.outputs.missing == 'true' }}
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
<details>
<summary>Preview of Release Notes to be Created</summary>
${{ steps.changelog_reader.outputs.changes }}
</details>
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
uses: mindsers/changelog-reader-action@v1
with:
version: ${{ steps.read_version.outputs.version }}
path: ./CHANGELOG.md
Expand All @@ -37,6 +37,6 @@ jobs:
with:
tag_name: ${{ steps.read_version.outputs.version }}
release_name: Changelog Enforcer ${{ steps.read_version.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
body: ${{ steps.changelog_reader.outputs.log_entry }}
draft: false
prerelease: false
7 changes: 0 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Dependencies
- `@actions/exec` from `1.0.3` to `1.0.4`
- `@actions/github` from `2.1.1` to `4.0.0`
- `eslint` from `6.3.0` to `7.14.0`
- `changelog-reader-action` from `v1` to `v2`

## [v1.5.0]
### Added
- New input parameter `expectedLatestVersion`.
Expand Down
Loading

0 comments on commit c825ef5

Please sign in to comment.