Skip to content

Commit

Permalink
Wrap up
Browse files Browse the repository at this point in the history
  • Loading branch information
julio-coelho committed Sep 9, 2020
1 parent b877d2f commit bb89cd5
Show file tree
Hide file tree
Showing 15 changed files with 13,726 additions and 2,912 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -17,6 +17,8 @@ jobs:
- name: Create a release draft for a version tag
id: create-release-draft
uses: ./
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Print the URL of the release draft
run: echo ${{ steps.create-release-draft.outputs.release-url }}

10 changes: 6 additions & 4 deletions __tests__/main.test.ts
@@ -1,13 +1,15 @@
import * as core from '@actions/core'
import { run } from '../src/main'
import {run} from '../src/main'

jest.mock('@actions/core');
jest.mock('@actions/core')

describe('When running the action', () => {
const fakeSetOutput = core.setOutput as jest.MockedFunction<typeof core.setOutput>;
const fakeSetOutput = core.setOutput as jest.MockedFunction<
typeof core.setOutput
>

test('it should set the release-url output parameter', async () => {
await run()
expect(fakeSetOutput).toHaveBeenCalledWith('release-url', expect.anything())
})
})
})
7 changes: 7 additions & 0 deletions action.yml
@@ -1,9 +1,16 @@
name: 'Auto Release Draft'
description: 'Drafts a GitHub release with the changes introduced by a newly created version tag.'
author: 'Julio Coelho'
inputs:
repo-token:
description: 'The GITHUB_TOKEN used to authenticate to the current repository'
required: true
outputs:
release-url:
description: 'The URL of the GitHub release that was drafted'
runs:
using: 'node12'
main: 'dist/index.js'
branding:
color: green
icon: tag
9,288 changes: 9,168 additions & 120 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

583 changes: 583 additions & 0 deletions dist/licenses.txt

Large diffs are not rendered by default.

0 comments on commit bb89cd5

Please sign in to comment.