Setup YouTube Uploader on GitHub Actions to use youtubeuploader
.
This action installs porjo/youtubeuploader for use in actions by installing it on tool cache using AnimMouse/tool-cache.
This action is implemented as a composite action.
To use youtubeuploader
, run this action before youtubeuploader
.
- Encode the client_secrets.json file in Base64 using this command
base64 -w 0 client_secrets.json
and paste it toCLIENT_SECRETS
secret. - Encode the request.token file in Base64 using this command
base64 -w 0 request.token
and paste it toREQUEST_TOKEN
secret.
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.CLIENT_SECRETS }}
request_token: ${{ secrets.REQUEST_TOKEN }}
- run: youtubeuploader -filename video.mkv
You can also use process substitution for passing credentials. Only applies on Ubuntu and macOS.
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.CLIENT_SECRETS }}
request_token: ${{ secrets.REQUEST_TOKEN }}
You can specify the version you want. By default, this action downloads the latest version if version is not specified.
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.CLIENT_SECRETS }}
request_token: ${{ secrets.REQUEST_TOKEN }}
version: 23.04
This action automatically uses a GitHub token in order to authenticate with GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.
steps:
- name: Setup YouTube Uploader
uses: AnimMouse/setup-youtubeuploader@v2
with:
client_secrets: ${{ secrets.CLIENT_SECRETS }}
request_token: ${{ secrets.REQUEST_TOKEN }}
token: ${{ secrets.GH_PAT }}