Skip to content

Commit

Permalink
Release 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dangoslen authored Mar 18, 2021
1 parent 795b6ea commit 2e85bed
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
tag: ${{ steps.read-version.outputs.tag }}
steps:
- uses: actions/checkout@v2

- id: read-version
run: |
echo "::set-output name=version::$(jq -r ".version" package.json)"
Expand All @@ -28,10 +29,13 @@ jobs:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACTION_TOKEN }}

- run: |
npm install
- run: |
npm run all
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Auto commit packaged action"
Expand All @@ -43,19 +47,20 @@ jobs:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACTION_TOKEN }}

- uses: ./
with:
version: ${{ needs.setup.outputs.version }}
newVersionLineNumber: 3
activationLabel: 'dependabot-helper'
changelogPath: './CHANGELOG.md'

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Updated Changelog"

- id: changelog-enforcer
uses: dangoslen/changelog-enforcer@v2
with:
expectedLatestVersion: ${{ needs.setup.outputs.version }}

- if: failure()
uses: unsplash/comment-on-pr@master
env:
Expand All @@ -76,18 +81,21 @@ jobs:
- uses: actions/checkout@v2
with:
token: ${{ secrets.ACTION_TOKEN }}

- name: get changelog entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: "${{ needs.setup.outputs.version }}"
path: ./CHANGELOG.md

- name: check for release
id: check_release
run: |
TAG=$(git ls-remote --tags origin | grep ${{ needs.setup.outputs.tag }} || [[ $? == 1 ]] && echo '')
MISSING=$([[ -z "$TAG" ]] && echo 'true' || echo 'false')
echo ::set-output name=missing::$MISSING
- name: preview changelog
if: ${{ steps.check_release.outputs.missing == 'true' }}
uses: unsplash/comment-on-pr@master
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.3.0]
### Added
- Adds proper GitHub Action branding
### Changed
- Updates the [README.md](./README.md) for proper formatting
- Updates the default value for `activationLabel` from `dependencies` to `dependabot`

## [0.2.0]
### Added
- Addresses #22. Previously updated package entries in the same version will be updated if a newer update comes along
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ Below are the properties allowed by the Dependabot Changelog Helper.
* The path to the CHANGELOG file to add dependabot entries to.

#### `activationLabel`
* Default: `dependencies`
* Default: `dependabot`
* The label to indicate that the action should run

### `newVersionLineNumber`
#### `newVersionLineNumber`
* Default: 3
* If the desired version is not found in the file, this is the default line number (1-indexed) in which to place the new version
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ inputs:
description: |
"The label to indicate that the action should run"
required: true
default: 'dependencies'
default: 'dependabot'
newVersionLineNumber:
description: |
"If the desired version is not found in the file, this is the default line number (1-indexed) in which to place the new version"
Expand All @@ -26,3 +26,6 @@ inputs:
runs:
using: 'node12'
main: 'dist/index.js'
branding:
color: green
icon: edit
2 changes: 1 addition & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "depenadbot-helper",
"version": "0.2.0",
"private": true,
"version": "0.3.0",
"private": false,
"description": "A GitHub Action to auto-add dependabot changes to your changelog and increment version numbers",
"main": "lib/dependabot-helper.js",
"scripts": {
Expand Down

0 comments on commit 2e85bed

Please sign in to comment.