Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec0ba8651f | ||
|
|
0d3c327d15 | ||
|
|
24dc1f0ef1 | ||
|
|
94502fe175 | ||
|
|
2f92806c5d | ||
|
|
d715678c11 | ||
|
|
3735b5ec52 | ||
|
|
17fcb1df4f | ||
|
|
47b74e816a | ||
|
|
a9a904a8a4 | ||
|
|
49404e33ce |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -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 }}",
|
||||
})
|
||||
|
||||
2
.github/workflows/versioning.yml
vendored
2
.github/workflows/versioning.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
2
dist/index.js
vendored
@@ -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
8
package-lock.json
generated
@@ -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": {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user