Skip to content

Commit

Permalink
Merge pull request #32 from AButler/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies and allow release ID to be specified explicitly
  • Loading branch information
AButler authored Nov 20, 2023
2 parents 80edd41 + ef89156 commit 1a6b21b
Show file tree
Hide file tree
Showing 12 changed files with 1,108 additions and 514 deletions.
70 changes: 70 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"projectName": "upload-release-assets",
"projectOwner": "AButler",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
"contributors": [
{
"login": "AButler",
"name": "Andrew Butler",
"avatar_url": "https://avatars.githubusercontent.com/u/1628649?v=4",
"profile": "https://github.com/AButler",
"contributions": [
"code"
]
},
{
"login": "dependabot[bot]",
"name": "dependabot[bot]",
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"profile": "https://github.com/apps/dependabot",
"contributions": [
"code"
]
},
{
"login": "Andre601",
"name": "Andre_601",
"avatar_url": "https://avatars.githubusercontent.com/u/11576465?v=4",
"profile": "https://andre601.ch/",
"contributions": [
"code"
]
},
{
"login": "coreybutler",
"name": "Corey Butler",
"avatar_url": "https://avatars.githubusercontent.com/u/770982?v=4",
"profile": "https://author.io/",
"contributions": [
"code"
]
},
{
"login": "Borda",
"name": "Jirka Borovec",
"avatar_url": "https://avatars.githubusercontent.com/u/6035284?v=4",
"profile": "https://github.com/Borda",
"contributions": [
"code"
]
},
{
"login": "NotMyFault",
"name": "Alexander Brandes",
"avatar_url": "https://avatars.githubusercontent.com/u/13383509?v=4",
"profile": "https://github.com/NotMyFault",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"linkToUsage": false
}
25 changes: 16 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
name: CI

on: [push, pull_request]
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4

- name: Restore
run: npm ci

- name: Build
run: npm run build

- name: Restore
run: npm ci

- name: Build
run: npm run build
- name: Check contributors
run: npx all-contributors check
50 changes: 43 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,62 @@
## Upload Release Assets - GitHub Action
# Upload Release Assets - GitHub Action

<a href="https://github.com/AButler/upload-release-assets"><img alt="GitHub Actions status" src="https://github.com/AButler/upload-release-assets/workflows/CI/badge.svg"></a>

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

The Upload Release Assets GitHub Action uploads files (base on a glob) to a GitHub release. This is a cross-platform action that runs on any environment.

### Usage
## Usage

```yml
jobs:
build:
# ...
steps:
- uses: AButler/upload-release-assets@v2.0
- uses: AButler/upload-release-assets@v3.0
with:
files: 'artifacts/*;packages/*.nupkg'
files: "artifacts/*;packages/*.nupkg"
repo-token: ${{ secrets.GITHUB_TOKEN }}
```
### Inputs
## Inputs
| Name | Description | Examples |
|---------------|---------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| ------------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| `files` | The glob of files to upload (semicolon separate multiple globs) | `file.txt` <br> `file*.txt` <br> `file_{a,b}.txt;*.json` |
| `repo-token` | The GitHub token to use to amend the release _(recommended to use `${{ secrets.GITHUB_TOKEN }}`)_ | `${{ secrets.GITHUB_TOKEN }}` |
| `release-tag` | _(Optional)_ Specify the tag of the release to upload to | `v1.0.0` |
| `release-id` | _(Optional)_ Explicitly specify the release id | `42` |
| `release-tag` | _(Optional)_ Explicity specify the tag of the release | `v1.0.0` |

If `release-id` is specified, then this release with this will be used.
If `release-tag` is specified, the release with this tag will be used.
If neither are specified, the release from the action is used.

## Contributors

A big thanks to those who have contributed to this repo:

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/AButler"><img src="https://avatars.githubusercontent.com/u/1628649?v=4?s=100" width="100px;" alt="Andrew Butler"/><br /><sub><b>Andrew Butler</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=AButler" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt="dependabot[bot]"/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=dependabot[bot]" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://andre601.ch/"><img src="https://avatars.githubusercontent.com/u/11576465?v=4?s=100" width="100px;" alt="Andre_601"/><br /><sub><b>Andre_601</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=Andre601" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://author.io/"><img src="https://avatars.githubusercontent.com/u/770982?v=4?s=100" width="100px;" alt="Corey Butler"/><br /><sub><b>Corey Butler</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=coreybutler" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Borda"><img src="https://avatars.githubusercontent.com/u/6035284?v=4?s=100" width="100px;" alt="Jirka Borovec"/><br /><sub><b>Jirka Borovec</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=Borda" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NotMyFault"><img src="https://avatars.githubusercontent.com/u/13383509?v=4?s=100" width="100px;" alt="Alexander Brandes"/><br /><sub><b>Alexander Brandes</b></sub></a><br /><a href="https://github.com/AButler/upload-release-assets/commits?author=NotMyFault" title="Code">💻</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
18 changes: 10 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: 'Upload assets to a Release'
description: 'GitHub Action that uploads assets to a GitHub release using a glob (cross-platform)'
author: 'AButler'
name: "Upload assets to a Release"
description: "GitHub Action that uploads assets to a GitHub release using a glob (cross-platform)"
author: "AButler"
branding:
color: green
icon: upload-cloud
inputs:
files:
description: 'A glob of the files to upload'
description: "A glob of the files to upload"
required: true
release-tag:
description: 'The tag name of the release to upload to (if not specified then the release that triggered the workflow is used)'
description: "The tag name of the release to upload to (if not specified then the release that triggered the workflow is used)"
release-id:
description: "The ID of the release to upload to (if not specified then the release that triggered the workflow is used)"
repo-token:
description: 'secrets.GITHUB_TOKEN'
description: "secrets.GITHUB_TOKEN"
required: true
runs:
using: 'node20'
main: 'lib/main.js'
using: "node20"
main: "dist/main.js"
111 changes: 111 additions & 0 deletions dist/main.js

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

1 change: 1 addition & 0 deletions dist/main.js.map

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

Loading

0 comments on commit 1a6b21b

Please sign in to comment.