https://github.com/animmouse/setup-youtubeuploader
Setup/Install YouTube Uploader for GitHub Actions
https://github.com/animmouse/setup-youtubeuploader
action actions github-actions youtube youtube-api youtube-upload youtube-uploader
Last synced: about 1 year ago
JSON representation
Setup/Install YouTube Uploader for GitHub Actions
- Host: GitHub
- URL: https://github.com/animmouse/setup-youtubeuploader
- Owner: AnimMouse
- License: mpl-2.0
- Created: 2022-06-22T15:04:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-27T06:34:31.000Z (over 1 year ago)
- Last Synced: 2025-02-28T20:15:37.226Z (about 1 year ago)
- Topics: action, actions, github-actions, youtube, youtube-api, youtube-upload, youtube-uploader
- Language: PowerShell
- Homepage: https://github.com/marketplace/actions/setup-youtube-uploader
- Size: 25.4 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup YouTube Uploader for GitHub Actions
Setup [YouTube Uploader](https://github.com/porjo/youtubeuploader) on GitHub Actions to use `youtubeuploader`.
This action installs [porjo/youtubeuploader](https://github.com/porjo/youtubeuploader) for use in actions by installing it on tool cache using [AnimMouse/tool-cache](https://github.com/AnimMouse/tool-cache).
This action is implemented as a [composite](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) action.
## Usage
To use `youtubeuploader`, run this action before `youtubeuploader`.
1. Encode the client_secrets.json file in Base64 using this command `base64 -w 0 client_secrets.json` and paste it to `YOUTUBE_CLIENT_SECRETS` secret.
2. Encode the request.token file in Base64 using this command `base64 -w 0 request.token` and paste it to `YOUTUBE_REQUEST_TOKEN` secret.
```yaml
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.YOUTUBE_CLIENT_SECRETS }}
request_token: ${{ secrets.YOUTUBE_REQUEST_TOKEN }}
- run: youtubeuploader -filename video.mkv
```
### Process substitution
You can also use process substitution for passing credentials. Only applies on Ubuntu and macOS.
```yaml
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
- run: youtubeuploader -secrets <(echo "$client_secrets" | base64 -d) -cache <(echo "$request_token" | base64 -d) -filename video.mkv
env:
client_secrets: ${{ secrets.YOUTUBE_CLIENT_SECRETS }}
request_token: ${{ secrets.YOUTUBE_REQUEST_TOKEN }}
```
### Specific version
You can specify the version you want. By default, this action downloads the latest version if the version is not specified.
```yaml
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.YOUTUBE_CLIENT_SECRETS }}
request_token: ${{ secrets.YOUTUBE_REQUEST_TOKEN }}
version: v1.24.4
```
### GitHub token
This action automatically uses a GitHub token in order to authenticate with the GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.
```yaml
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.YOUTUBE_CLIENT_SECRETS }}
request_token: ${{ secrets.YOUTUBE_REQUEST_TOKEN }}
token: ${{ secrets.GH_PAT }}
```