https://github.com/luckyturtledev/artifacts2release
https://github.com/luckyturtledev/artifacts2release
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/luckyturtledev/artifacts2release
- Owner: LuckyTurtleDev
- Created: 2023-06-08T16:24:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T12:05:26.000Z (almost 3 years ago)
- Last Synced: 2025-04-07T04:24:15.924Z (about 1 year ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# artifacts2release
A small Github Action for publishing artefacts to an existing release.
## Usage
This Action should run after creating artifacts,
inside it own job running on `ubuntu`.
At the example below you can see an minimal workflow,
which publishs all previous created artifacts to release.
Make sure your `GITHUB_TOKEN` has enable write access.
Ensure also artifacts2release runs after the jobs, which are creating the artifacts, by using `needs: [SOME_JOBS]`
and that it is only run once per Release by checking the release type.
```yml
on:
push:
pull_request:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/upload-artifact@v3
with:
name: foo
path: foo
- uses: actions/upload-artifact@v3
with:
name: dir
path: dir
github_publish:
runs-on: ubuntu-latest
needs: [build]
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/checkout@v3 #needed to get github.event.release.tag_name
- name: Upload Release Artifacts
uses: LuckyTurtleDev/artifacts2release@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
| Name | Required | Description | Type | Default |
|:-----------------:|:--------:|:-------------------------------------------------------------|:------:|:------------------------------------:|
| github_token | ✔ | GitHub secret token, usually `${{secrets.GITHUB_TOKEN}}`. | string | |
| release_name | | Github release to which the artifacts are uploaded. | string | `${{github.event.release.tag_name}}` |
| artifacts | | Artifacts, which will be uploaded. (default all) | string | |