Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Aug 18, 2023
2 parents 5da65c9 + 1196f0b commit 7a92f00
Show file tree
Hide file tree
Showing 12 changed files with 173,347 additions and 176,299 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ updates:
- nwtgck
assignees:
- nwtgck
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
timezone: Asia/Tokyo
open-pull-requests-limit: 99
reviewers: [ nwtgck ]
assignees: [ nwtgck ]
8 changes: 4 additions & 4 deletions .github/workflows/comment-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ on:

jobs:
comment-run:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# 0 indicates all history
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 12
- uses: nwtgck/actions-comment-run@v1.1
node-version: 16
- uses: nwtgck/actions-comment-run@v2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allowed-associations: '["OWNER"]'
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [2.1.0] - 2023-08-18
### Changed
* Update dependencies

### Added
* Add "enable-github-deployment" input [#901](https://github.com/nwtgck/actions-netlify/pull/901) by [@a-tokyo](https://github.com/a-tokyo)

## [2.0.0] - 2022-12-08
### Changed
* Update dependencies
Expand Down Expand Up @@ -192,7 +199,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
* Deploy to Netlify
* Comment on GitHub PR

[Unreleased]: https://github.com/nwtgck/actions-netlify/compare/v2.0.0...HEAD
[Unreleased]: https://github.com/nwtgck/actions-netlify/compare/v2.1.0...HEAD
[2.1.0]: https://github.com/nwtgck/actions-netlify/compare/v2.0.0...v2.1.0
[2.0.0]: https://github.com/nwtgck/actions-netlify/compare/v1.2.4...v2.0.0
[1.2.4]: https://github.com/nwtgck/actions-netlify/compare/v1.2.3...v1.2.4
[1.2.3]: https://github.com/nwtgck/actions-netlify/compare/v1.2.2...v1.2.3
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ on:
pull_request:
jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# ( Build to ./dist or other directory... )

- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.2
uses: nwtgck/actions-netlify@v2.0
with:
publish-dir: './dist'
production-branch: master
Expand Down Expand Up @@ -64,6 +64,7 @@ jobs:
- `alias` Specifies the prefix for the deployment URL, must not have uppercase or special characters (default: Netlify build ID)
- `alias: ${{ github.head_ref }}` replicates the [branch deploy prefix](https://docs.netlify.com/site-deploys/overview/#definitions)
- `alias: deploy-preview-${{ github.event.number }}` replicates the [deploy preview prefix](https://docs.netlify.com/site-deploys/overview/#definitions)
- `enable-github-deployment` Whether or not to deploy to GitHub (default: true)
- `github-deployment-environment` Environment name of GitHub Deployments
- `github-deployment-description` Description of the GitHub Deployment
- `fails-without-credentials` Fails if no credentials provided (default: false)
Expand Down
21 changes: 21 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,27 @@ describe('defaultInputs', () => {
})
})
})

describe('enableGithubDeployment', () => {
test('it should be default value (true) when not specified', () => {
const b: boolean = defaultInputs.enableGithubDeployment()
expect(b).toBe(true)
})

test('it should be true when "true" specified', () => {
withInput('enable-github-deployment', 'true', () => {
const b: boolean = defaultInputs.enableGithubDeployment()
expect(b).toBe(true)
})
})

test('it should be true when "false" specified', () => {
withInput('enable-github-deployment', 'false', () => {
const b: boolean = defaultInputs.enableGithubDeployment()
expect(b).toBe(false)
})
})
})
})

// Old tests below
Expand Down
2 changes: 1 addition & 1 deletion __tests__/production-deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('Draft deploy', () => {
)
})

test('deploy should have draft true when production-branch doesnt match context ref', async () => {
test('deploy should have draft true when production-branch does not match context ref', async () => {
mocked(defaultInputs.productionDeploy).mockReturnValue(false)
mocked(defaultInputs.productionBranch).mockReturnValue('master')

Expand Down
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
description: Production branch
required: false
production-deploy:
description: Indicate wether to deploy production build
description: Indicate whether to deploy production build
required: false
enable-pull-request-comment:
description: Enable pull request comment
Expand All @@ -38,6 +38,9 @@ inputs:
alias:
description: Specifies the prefix for the deployment URL
required: false
enable-github-deployment:
description: Whether or not to deploy to GitHub
required: false
github-deployment-environment:
description: Environment name of GitHub Deployments
required: false
Expand Down
Loading

0 comments on commit 7a92f00

Please sign in to comment.