diff --git a/.github/workflows/github-action-release_for_template.yml b/.github/workflows/github-action-release_for_template.yml deleted file mode 100644 index d6d3d3a..0000000 --- a/.github/workflows/github-action-release_for_template.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: release-package -on: - push: - branches: - - release - -env: - PROJECT_NAME: template-ax2tia - SCOPE: simatic-ax - ACTIONS_REPO: simatic-ax/actions - ACTIONS_LOCAL: ./actions - VERSIONING_TOOL_REPO: simatic-ax/simatic_versioning -jobs: - versioning: - name: "Bump the version of the package according to the conventional commit" - runs-on: ubuntu-latest - steps: - - name: "Clone the library repository" - uses: actions/checkout@v3 - - name: "Clone repository for CI workflows" - uses: actions/checkout@v3 - with: - repository: ${{ env.ACTIONS_REPO }} - token: ${{ secrets.CI_KIT_TOKEN }} - path: ./actions - - name: "Get the latest version of the package" - run: | - echo "@simatic-ax:registry=https://npm.pkg.github.com/" >> .npmrc - echo "//npm.pkg.github.com/:_authToken=${{ secrets.CI_KIT_TOKEN }}" >> .npmrc - echo "always-auth = true" >> .npmrc - cat .npmrc - echo "VERSION=$(npm show @${{ env.SCOPE }}/${{ env.PROJECT_NAME }} version --registry=https://npm.pkg.github.com --scope=${{ env.SCOPE }})" >> $GITHUB_ENV - echo $VERSION - - name: "Check contents of actions folder" - run: tree -d ./actions - - name: "Install apax and dependencies" - uses: ./actions/.github/actions/setup-apax-runner - with: - apax-access-token: ${{ secrets.APAX_TOKEN }} - - - name: "Get latest simatic-versioning executable" - uses: dsaltares/fetch-gh-release-asset@master - with: - repo: ${{ env.VERSIONING_TOOL_REPO }} - file: "conventional-commit" - token: ${{ secrets.CI_KIT_TOKEN }} - - - id: bump - name: "Bump version" - run: | - apax version ${{ env.VERSION }} - sudo chmod +x ./conventional-commit - ./conventional-commit -c "${{ github.event.head_commit.message }}" -v "${{ env.VERSION }}" >> .version - cat .version - - name: "Upload version" - uses: actions/upload-artifact@v3 - with: - name: version - path: .version - release: - name: "Release binary" - runs-on: ubuntu-latest - needs: versioning - steps: - - name: "Clone the library repository" - uses: actions/checkout@v3 - - - name: "Clone repository for CI workflows" - uses: actions/checkout@v3 - with: - repository: simatic-ax/actions - token: ${{ secrets.CI_KIT_TOKEN }} - path: ./actions - - - name: "Install apax and dependencies" - uses: ./actions/.github/actions/setup-apax-runner - with: - apax-access-token: ${{ secrets.APAX_TOKEN }} - - # - name: "Download artifact" - # uses: actions/download-artifact@v3 - # with: - # name: library-artifact - - - name: "Login to the private repo" - run: | - apax login \ - --registry "https://npm.pkg.github.com" \ - --password ${{ secrets.CI_KIT_TOKEN }} - - name: "Download artifact" - uses: actions/download-artifact@v3 - with: - name: version - - - name: "Pack and publish the library" - run: | - cat .version - apax version "$(cat .version)" - apax pack 2>.package.err 1>.signature - PACKAGE="$(grep -oP '(?<=\").+.apax\.tgz(?=\")' .package.err)" - apax publish --package $PACKAGE --registry https://npm.pkg.github.com \ No newline at end of file diff --git a/.github/workflows/release-template.yml b/.github/workflows/release-template.yml new file mode 100644 index 0000000..9378f55 --- /dev/null +++ b/.github/workflows/release-template.yml @@ -0,0 +1,15 @@ +on: + push: + # Pattern matched against refs/tags + tags: + - "*" + +jobs: + release-apax-lib: + uses: simatic-ax/actions/.github/workflows/apax-publish-template.yml@stable + secrets: + APAX_TOKEN: ${{ secrets.APAX_TOKEN }} + DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} + + with: + VERSION: ${{ github.ref_name }} \ No newline at end of file diff --git a/template/apax.yml b/template/apax.yml index 1a191cc..98fc47c 100644 --- a/template/apax.yml +++ b/template/apax.yml @@ -24,15 +24,14 @@ targets: - 'llvm' # Dependencies devDependencies: - "@ax/sdk": 3.0.2 - "@ax/ax2tia": 4.0.5 + "@ax/sdk": 3.0.10 + "@ax/ax2tia": 4.4.12 "@simatic-ax/snippetscollection": 0.0.15 # Apax scripts scripts: # set the path to your local TIA Portal installation in the .env file export-tialib: ax2tia -i ./bin/1500/*.lib -o "$PATH_NAME" - import-tialib: '"$TIA_INSTALL_PATH\\Siemens.Simatic.Lang.Library.Importer.exe" - -i "$PATH_NAME" -o "$TIA_GLOBAL_LIB_PATH"' + import-tialib: '"$TIA_INSTALL_PATH\\Siemens.Simatic.Lang.Library.Importer.exe" -i "$PATH_NAME" -o "$TIA_GLOBAL_LIB_PATH"' create-tialib: - apax build - apax export-tialib