Home

Awesome

twinpack-action

This GitHub Action can be used to upload a TwinCAT .library file as a package to Twinpack, the first TwinCAT Package manager. Usually you'd want to create workflow such that any release of your repository is automatically uploaded to the package manager and/or trigger the publish workflow manually.

Using Twinpack is completely free and the package manager is open source, but you have to register an account. This is needed so nobody can publish new versions of your packages under your name. Note that your username and password can be used with all other actions that are provided by Zeugwerk, namely

Inputs

Creating secrets

We highly recommend to store the value for username and password in GitHub as secrets. GitHub Secrets are encrypted and allow you to store sensitive information, such as access tokens, in your repository. Do these steps for username and password

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click on the "Settings" tab.
  3. In the left sidebar, click Secrets.
  4. On the right bar, click on "Add a new secret"
  5. Type a name for your secret in the "Name" input box. (i.e. ACTIONS_ZGWK_USERNAME, ACTIONS_ZGWK_PASSWORD)
  6. Type the value for your secret.
  7. Click Add secret.

Example usage

Save this content in your repository to .github/workflows/publish.yml to enable automatic uploading of a release to Twinpack whenever you publish a new release

name: Publish
on:
  release:
    types: [published]
  workflow_dispatch:
jobs:
  Deploy:
    name: Twinpack
    runs-on: windows-latest
    steps:
      - uses: robinraju/release-downloader@v1.8
        with:
          latest: true
          fileName: "*.library"
      - uses: Zeugwerk/twinpack-action@v0.4.0
        with:
          username: ${{ secrets.ACTIONS_ZGWK_USERNAME }}
          password: ${{ secrets.ACTIONS_ZGWK_PASSWORD }} 

See the struckig project for a demonstration on how to use the action