diff --git a/.github/workflows/build-library.yml b/.github/workflows/build-library.yml deleted file mode 100644 index e2c2e29..0000000 --- a/.github/workflows/build-library.yml +++ /dev/null @@ -1,10 +0,0 @@ -on: push - -jobs: - test-apax-lib: - uses: simatic-ax/actions/.github/workflows/apax-build-test.yml@stable - secrets: - APAX_TOKEN: ${{ secrets.APAX_TOKEN }} - SIMATIC_AX_TOKEN: ${{ secrets.DEPLOY_KEY }} - with: - LOGIN_SIMATIC_AX: true diff --git a/.github/workflows/lint-repo.yml b/.github/workflows/lint-repo.yml deleted file mode 100644 index 9863aa7..0000000 --- a/.github/workflows/lint-repo.yml +++ /dev/null @@ -1,4 +0,0 @@ -on: push -jobs: - lint-repo-and-markdown: - uses: simatic-ax/actions/.github/workflows/check-repository.yml@stable diff --git a/.github/workflows/package-development-workflow.yml b/.github/workflows/package-development-workflow.yml new file mode 100644 index 0000000..5163f0c --- /dev/null +++ b/.github/workflows/package-development-workflow.yml @@ -0,0 +1,88 @@ +# This workflow is going to be used during the development phase of the project +# The workflow builds and tests the the sources on the following triggers: +# - once a change is pushed to the main branch or any of its sub-branches +name: Library development workflow + +on: + push: + branches: + - 'main' # runs the workflow, once new changes have been integrated to main + - 'main/**' # runs the workflow, once new changes have been integrated to a sub-branch of main + pull_request: + branches: + - 'main' # run workflow in the scope of pull requests towards main + workflow_call: + secrets: + APAX_TOKEN: + required: true + inputs: + ref: + required: true + type: string + +permissions: + contents: read # required for checkout + packages: read # required for pulling the container + actions: write # required for artifact uploading + +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-24.04 + container: + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.5.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + # either check out a provided reference, or use the reference that triggered this workflow, e.g. a push, PR or a release + ref: ${{ inputs.ref != '' && inputs.ref || github.ref }} + + - name: Login to required registries + uses: simatic-ax/actions/apax-login@v3 + with: + apax-token: ${{ secrets.APAX_TOKEN }} + registries: | + https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + uses: simatic-ax/actions/apax-install@v3 + with: + immutable: true + + - name: Build source code + uses: simatic-ax/actions/apax-build@v3 + with: + apax-build-targets: | + llvm + 1500 + apax-build-args: | + --debug + --log Debug + + - name: Test source code + uses: simatic-ax/actions/apax-test@v3 + with: + coverage: true + loglevel: debug + + - name: Check links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + ignoreFiles: '["./actions-test/**"]' + check-modified-files-only: 'yes' + base-branch: 'main' + + - name: Upload build artifacts + if: ${{ github.event_name == 'workflow_call' || github.event_name == 'release'}} + uses: actions/upload-artifact@v4 + with: + name: build-artifacts + path: | + bin/1500 + bin/llvm + retention-days: 90 + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/package-release-workflow.yml b/.github/workflows/package-release-workflow.yml new file mode 100644 index 0000000..e7e5958 --- /dev/null +++ b/.github/workflows/package-release-workflow.yml @@ -0,0 +1,72 @@ +# This workflow is triggered when a release is published via the UI +# The workflow is only executed if the release is a tag and the target_commitish is a release branch +name: Release workflow + +# Start the workflow as soon as a release has been published via the UI +on: + release: + types: [published] + +permissions: + contents: write # required for checkout + packages: write # required for pulling the container + actions: write # required for artifact downloading + pull-requests: write # Für PR-Erstellung und Management + +jobs: + call-development: + name: Build the package + uses: ./.github/workflows/package-development-workflow.yml + secrets: + APAX_TOKEN: ${{ secrets.APAX_TOKEN }} + with: + # checks out the branch that has been selected during the release process + ref: ${{ github.event.release.target_commitish }} + + release: + name: Release the package + needs: call-development + runs-on: ubuntu-24.04 + container: + image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.5.0 + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.target_commitish }} + fetch-depth: 0 + + - name: Create bin folder + run: mkdir -p bin + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: build-artifacts + path: bin + + - name: Version package + uses: simatic-ax/actions/apax-version@v3 + with: + version: ${{ github.event.release.tag_name }} + + - name: Package source code + uses: simatic-ax/actions/apax-pack@v3 + with: + key: ${{ secrets.APAX_SIGNKEY }} + + - name: Login to required registries + uses: simatic-ax/actions/apax-login@v3 + with: + apax-token: ${{ secrets.APAX_TOKEN }} + registries: | + https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }} + + - name: Publish apax package + uses: simatic-ax/actions/apax-publish@v3 + with: + registries: | + https://npm.pkg.github.com \ No newline at end of file diff --git a/.github/workflows/release-library.yml b/.github/workflows/release-library.yml deleted file mode 100644 index af6befe..0000000 --- a/.github/workflows/release-library.yml +++ /dev/null @@ -1,16 +0,0 @@ -on: - push: - # Pattern matched against refs/tags - tags: - - '*' - -jobs: - release-apax-lib: - uses: simatic-ax/actions/.github/workflows/apax-publish.yml@stable - secrets: - APAX_TOKEN: ${{ secrets.APAX_TOKEN }} - DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} - APAX_SIGNKEY: ${{ secrets.APAX_SIGNKEY }} - - with: - VERSION: ${{ github.ref_name }} diff --git a/.markdownlint.yml b/.markdownlint.yml deleted file mode 100644 index 95479c5..0000000 --- a/.markdownlint.yml +++ /dev/null @@ -1,11 +0,0 @@ -# markdownlint YAML configuration ---- - -# Default state for all rules -default: true - -# ignored rules -line-length: false -no-inline-html: false -first-line-h1: false -no-emphasis-as-header: false \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 42c4730..420b82b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,5 +1,4 @@ # These owners will be the default owners for everything in the repo. # Unless a later match takes precedence, the listed user will be # requested for review when someone opens a pull request. -# * @global-user1 @global-user2 @global-user1 -@sjuergen \ No newline at end of file +* @sjuergen @ReinerSchinkoethe @theBadT @BeckerStS \ No newline at end of file diff --git a/repolinter.json b/repolinter.json deleted file mode 100644 index f662361..0000000 --- a/repolinter.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/todogroup/repolinter/master/rulesets/schema.json", - "version": 2, - "axioms": { - "linguist": "language", - "licensee": "license", - "packagers": "packager" - }, - "rules": { - "license-file-exists": { - "level": "off", - "rule": { - "type": "file-existence", - "options": { - "globsAny": ["LICENSE*", "COPYING*"], - "nocase": true - } - } - } - } -} \ No newline at end of file