How to release built artifacts from one to another repo on GitHub?
GitHub’s free version package storage is limited at 500MB for private repo, and Unlimited for public repo.
There is a way that you can remain your source code in a private repo, and only release your packages in a public repo. This is how gathertown did.
softprops/action-gh-release able to achieve that in two lines of code.
# workflow.yml# a lot code at the top
# ...release:
steps:
- name: Release
uses: softprops/action-gh-release@v1
with:
repository: ${{ secrets.owner }}/${{ secrets.repo }}
token: ${{ secrets.CUSTOM_TOKEN }}
By default repository
will be the current repo, and the token
will be GITHUB_TOKEN
GitHub automatically creates a
GITHUB_TOKEN
secret to use in your workflow. You can use theGITHUB_TOKEN
to authenticate in a workflow run.When you enable GitHub Actions, GitHub installs a GitHub App on your repository. The
GITHUB_TOKEN
secret is a GitHub App installation access token. You can use the installation access token to authenticate on behalf of the GitHub App installed on your repository. The token's permissions are limited to the repository that contains your workflow.