11 Commits
2.0.0 ... 2.1.0

Author SHA1 Message Date
Sven-Hendrik Haase
ec0ba8651f 2.1.0 2020-08-10 05:21:17 +02:00
Sven-Hendrik Haase
0d3c327d15 Merge pull request #23 from OmarEmaraDev/strip-refs-heads
Strip refs/heads/ from the input tag.
2020-08-10 05:02:21 +02:00
Omar Emara
24dc1f0ef1 Update the description of the tag input. 2020-08-07 17:02:07 +02:00
Omar Emara
94502fe175 Strip refs/heads/ from the input tag.
This patch strips refs/heads/ from the input tag to make it easier to
use the action with pushes on branches.
2020-08-05 18:54:20 +02:00
Sven-Hendrik Haase
2f92806c5d Merge pull request #21 from svenstaro/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-07-23 20:58:26 +02:00
dependabot[bot]
d715678c11 Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-18 01:49:53 +00:00
Sven-Hendrik Haase
3735b5ec52 Fix typos 2020-07-03 10:29:57 +02:00
Sven-Hendrik Haase
17fcb1df4f Fix last commit 2 2020-07-03 10:29:30 +02:00
Sven-Hendrik Haase
47b74e816a Fix last commit 2020-07-03 10:27:31 +02:00
Sven-Hendrik Haase
a9a904a8a4 Make sure parallel CI runs can't interfere 2020-07-03 10:24:43 +02:00
Sven-Hendrik Haase
49404e33ce Run versioning flow on ubuntu-latest 2020-07-03 10:22:24 +02:00
8 changed files with 19 additions and 13 deletions

View File

@@ -28,7 +28,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: README.md
asset_name: TEST.md
tag: ci-test-${{ matrix.os }}
tag: ci-test-${{ matrix.os }}-${{ github.run_id }}
overwrite: true
prerelease: true
body: "rofl lol test"
@@ -44,7 +44,7 @@ jobs:
const expected = fs.readFileSync("README.md")
const release = await github.repos.getReleaseByTag({
...context.repo,
tag: "ci-test-${{ matrix.os }}",
tag: "ci-test-${{ matrix.os }}-${{ github.run_id }}",
})
assert.deepStrictEqual(release.data.prerelease, true)
assert.deepStrictEqual(release.data.body, "rofl lol test")
@@ -59,7 +59,7 @@ jobs:
script: |
const release = await github.repos.getReleaseByTag({
...context.repo,
tag: "ci-test-${{ matrix.os }}",
tag: "ci-test-${{ matrix.os }}-${{ github.run_id }}",
})
await github.repos.deleteRelease({
...context.repo,
@@ -67,5 +67,5 @@ jobs:
})
await github.git.deleteRef({
...context.repo,
ref: "tags/ci-test-${{ matrix.os }}",
ref: "tags/ci-test-${{ matrix.os }}-${{ github.run_id }}",
})

View File

@@ -6,7 +6,7 @@ on:
jobs:
actions-tagger:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: Actions-R-Us/actions-tagger@latest
env:

View File

@@ -1,5 +1,8 @@
# Changelog
## [2.1.0] - 2020-08-10
- Strip refs/heads/ from the input tag [#23](https://github.com/svenstaro/upload-release-action/pull/23) (thanks @OmarEmaraDev)
## [2.0.0] - 2020-07-03
- Add `prerelease` input parameter. Setting this marks the created release as a pre-release.
- Add `release_name` input parameter. Setting this explicitly sets the title of the release.

View File

@@ -9,7 +9,7 @@ You must provide:
- `repo_token`: Usually you'll want to set this to `${{ secrets.GITHUB_TOKEN }}`.
- `file`: A local file to be uploaded as the asset.
- `tag`: The tag to upload into. If you want the current event's tag, use `${{ github.ref }}` (the `refs/tags/` prefix will be automatically stripped).
- `tag`: The tag to upload into. If you want the current event's tag or branch name, use `${{ github.ref }}` (the `refs/tags/` and `refs/heads/` prefixes will be automatically stripped).
Optional Arguments

2
dist/index.js vendored
View File

@@ -2263,7 +2263,7 @@ function run() {
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
const token = core.getInput('repo_token', { required: true });
const file = core.getInput('file', { required: true });
const tag = core.getInput('tag', { required: true }).replace('refs/tags/', '');
const tag = core.getInput('tag', { required: true }).replace('refs/tags/', '').replace('refs/heads/', '');
const file_glob = core.getInput('file_glob') == 'true' ? true : false;
const overwrite = core.getInput('overwrite') == 'true' ? true : false;
const prerelease = core.getInput('prerelease') == 'true' ? true : false;

8
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "upload-release-action",
"version": "1.0.2",
"version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -6664,9 +6664,9 @@
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
"dev": true
},
"lodash.memoize": {

View File

@@ -1,6 +1,6 @@
{
"name": "upload-release-action",
"version": "2.0.0",
"version": "2.1.0",
"private": true,
"description": "Upload files to a GitHub release",
"main": "lib/main.js",

View File

@@ -104,7 +104,10 @@ async function run(): Promise<void> {
// Get the inputs from the workflow file: https://github.com/actions/toolkit/tree/master/packages/core#inputsoutputs
const token = core.getInput('repo_token', {required: true})
const file = core.getInput('file', {required: true})
const tag = core.getInput('tag', {required: true}).replace('refs/tags/', '')
const tag = core
.getInput('tag', {required: true})
.replace('refs/tags/', '')
.replace('refs/heads/', '')
const file_glob = core.getInput('file_glob') == 'true' ? true : false
const overwrite = core.getInput('overwrite') == 'true' ? true : false