# Package Publishing
# Plugin Publish Checklist
This is a list of point to check prior to published your package on packages.opentap.io (opens new window).
# Update the Package Definition (package.xml
) file:
- Provide a meaningful
Name
(opens new window). We advise to make the names human readable, i.e. not Camel Case, no underscores, etc. No need to add "plugin" in the package name, as OpenTAP packages typically contain OpenTAP plugins. The name cannot contain '/' or be changed later, if you want to change the name you must publish the package under another name. - Provide
<Description>
(opens new window) of the package. - Provide
<Owner>
(opens new window). Should be the legal entity, this is likely to be the company you're working for or your name. - If your project is open-source, provide
<SourceUrl>
(opens new window) with a link to your project (GitHub/GitLab etc.). You should also provide a<SourceLicense>
(opens new window) to signify the license your project is under. Finally, make sure your repository is publicly available.
See all the available package definition options here (opens new window).
# Verify Dependencies
Make sure all dependencies are available on packages.opentap.io
. Also, consider only depending on released versions.
# Publish the Package
There are two main ways of publishing a package.
- Login to packages.opentap.io (opens new window), go to
Packages
and manually upload the package. - Upload the package from a CLI, see Uploading from CLI, best practice for CI/CD.
After upload, go to packages.opentap.io (opens new window) and follow the steps below to make your package public. You only need to do this once, as this will affect all current and future uploaded versions of the package:
- Login by clicking the
Login
button. - After login you will see a menu button with your profile name, click it and go to the
Admin
page. - Navigate to
Packages
, find the package you want to publish and click thePublish
button. - Fill out the form and click
Send Email Request
to send an email to the OpenTAP team.
# Uploading from CLI
If you have a project/solution that gets regular updates, it's best practice to run builds, tests and publishing of OpenTAP packages as part of a build pipeline (CI/CD).
For uploading packages in a CI/CD environment, you can use the "Repository Client" package for OpenTAP. This package has CLI commands to upload an OpenTAP package to the repository.
To install the "Repository Client", run: tap package install "Repository Client" --version 1.0
Then to upload your package to packages.opentap.io (opens new window) run: tap repo upload MyPackage.TapPackage --token <USER_TOKEN>
Note: You need a UserToken from the OpenTAP Repository before you can upload. On packages.opentap.io you can login and create new UserTokens directly on the homepage. For other OpenTAP repositories you should contact the administrator of that OpenTAP Repository.
Below is an example of a Github workflow that automatically publishes any TapPackages.
Publish:
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
environment: packages.opentap.io
runs-on: ubuntu-latest
needs:
- Build
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: package
path: ./
- name: Setup OpenTAP
uses: opentap/setup-opentap@v1.0
with:
version: 9.18.4
- name: Install Repository Client
run: tap package install -f "Repository Client" --version 1.0
- name: Publish
run: tap repo upload -t ${{ secrets.USER_TOKEN }} *.TapPackage
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20