From 7362b04d781cbe9a42a60f8f05dfc618f99560bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Seidel?= Date: Mon, 6 Feb 2023 22:12:43 +0100 Subject: [PATCH] cleanup workflows --- .../workflows/github-action-release-ae.yml | 121 ------------------ .../workflows/release-applicationexample.yml | 4 +- 2 files changed, 3 insertions(+), 122 deletions(-) delete mode 100644 .github/workflows/github-action-release-ae.yml diff --git a/.github/workflows/github-action-release-ae.yml b/.github/workflows/github-action-release-ae.yml deleted file mode 100644 index 0d956b1..0000000 --- a/.github/workflows/github-action-release-ae.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: release-package -on: workflow_dispatch -env: - PROJECT_NAME: ae-tiax - 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 repository for CI workflows" - uses: actions/checkout@v3 - with: - repository: ${{ env.ACTIONS_REPO }} - 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.DEPLOY_KEY }}" >> .npmrc - echo "always-auth = true" >> .npmrc - cat .npmrc - echo "VERSION=$(npm show @${{ env.SCOPE }}/template-${{ 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: "Get latest simatic-versioning executable" - uses: dsaltares/fetch-gh-release-asset@master - with: - repo: ${{ env.VERSIONING_TOOL_REPO }} - file: "conventional-commit" - token: ${{ secrets.DEPLOY_KEY }} - - - id: bump - name: "Bump version" - run: | - sudo chmod +x ./conventional-commit - ./conventional-commit -c "fix(test): fix something" -v "${{ env.VERSION }}" >> .version - cat .version - - - name: "Upload version" - uses: actions/upload-artifact@v3 - with: - name: version - path: .version - - create_template: - name: "Create template" - runs-on: ubuntu-latest - needs: versioning - - steps: - - name: "Clone private AX github actions" - uses: actions/checkout@v3 - with: - repository: simatic-ax/actions - path: ./actions - - - name: "Install apax and dependencies" - uses: ./actions/.github/actions/setup-apax-runner - with: - apax-access-token: ${{ secrets.APAX_TOKEN }} - - - name: "Login to AX registry" - run: apax login --password ${{ secrets.APAX_TOKEN }} - - - name: "Login to GitHb registry" - run: | - apax login \ - --registry "https://npm.pkg.github.com" \ - --password ${{ secrets.DEPLOY_KEY }} - - - name: "Download artifact with version" - uses: actions/download-artifact@v3 - with: - name: version - - - name: "Create an empty template" - run: | - mkdir simatic-ax-${{ env.PROJECT_NAME }} - cd simatic-ax-${{ env.PROJECT_NAME }} - mkdir template - VERSION=$(cat ../.version) - echo name: "'@simatic-ax/template-${{ env.PROJECT_NAME }}'" >> apax.yml - echo version: $VERSION >> apax.yml - echo type: generic >> apax.yml - cat apax.yml - # files section will be created in the "pack" step - cd .. - - - name: "Clone the library repository into the template folder" - uses: actions/checkout@v3 - with: - path: ./simatic-ax-${{ env.PROJECT_NAME }}/template - - - name: "Set the version in the application example" - run: | - cd simatic-ax-${{ env.PROJECT_NAME }}/template - echo update apax.yml in template - VERSION=$(cat ../../.version) - echo version: $VERSION - apax version $VERSION - - name: "Pack" - run: | - cd ./simatic-ax-${{ env.PROJECT_NAME }} - ls - # attach the files section dynamically - cat ./template/apax-files-section.yml >> ./apax.yml - cat apax.yml - apax pack 2>.package.err 1>.signature - - - name: "Publish" - run: | - echo publishing package to https://npm.pkg.github.com - cd ./simatic-ax-${{ env.PROJECT_NAME }} - PACKAGE="$(grep -oP '(?<=\").+.apax\.tgz(?=\")' .package.err)" - apax publish --package $PACKAGE --registry https://npm.pkg.github.com diff --git a/.github/workflows/release-applicationexample.yml b/.github/workflows/release-applicationexample.yml index ac5f829..1ac3620 100644 --- a/.github/workflows/release-applicationexample.yml +++ b/.github/workflows/release-applicationexample.yml @@ -5,6 +5,8 @@ on: - "*" jobs: + lint-repo-and-markdown: + uses: simatic-ax/actions/.github/workflows/check-repository.yml@stable release-apax-lib: uses: simatic-ax/actions/.github/workflows/apax-publish-template.yml@stable secrets: @@ -13,4 +15,4 @@ jobs: with: VERSION: ${{ github.ref_name }} - PROJECT_NAME: ae-actions-test \ No newline at end of file + PROJECT_NAME: ae-tiax \ No newline at end of file