Giter Club home page Giter Club logo

twinpack-action's Introduction

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

  • zkdoc-action automatic documentation generation, can be used to generate up-to-date documentation, which is directly hosted on GitHub or on a private server
  • zkbuild-action compiling and unittesting a PLC with a GitHub action. For Libraries the binary is uploaded to GitHub
  • zkbinding-action code generation for a PLC for C++ and C# to automatically generate bindings for HMIs and other tools interacting with the PLC.

Inputs

  • username: (Required) Username of a Zeugwerk Useraccount

  • password: (Required) Password of a Zeugwerk Useraccount

  • path: (Optional) This defaults to "." and controls the path where the Twinpack command line interface is looking for .library files

  • configuration: (Optional) Defaults to "Release" and should not be changed. For users without a subscription to our services the value can not be changed. It is used to upload debug builds and snapshots to Twinpack

  • target: (Optional) Defaults to "TC3" and should not be changed. For users without a subscription to our services the value can not be changed. It is used to specify the target that a library was compiled for. This makes it possible to publish the same version of a library for different TwinCAT versions.

  • branch: (Optional) Default to "main" and should not be changed. It can be used to upload temporary releases of feature branches for continuous integration

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/[email protected]
        with:
          latest: true
          fileName: "*.library"
      - uses: Zeugwerk/[email protected]
        with:
          username: ${{ secrets.ACTIONS_ZGWK_USERNAME }}
          password: ${{ secrets.ACTIONS_ZGWK_PASSWORD }} 

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

twinpack-action's People

Contributors

iadonkey avatar

Stargazers

 avatar

Watchers

Matthias Seehauser avatar Matthias Pfurtscheller avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.