Skip to content

Commit b80ae3f

Browse files
authored
Merge pull request #108 from simatic-ax/incorporate-new-workflows
chore: Incorporate new actions and workflows
2 parents 7c91ed2 + 510ebc0 commit b80ae3f

File tree

8 files changed

+160
-66
lines changed

8 files changed

+160
-66
lines changed

.github/workflows/build-library.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/lint-repo.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This workflow is going to be used during the development phase of the project
2+
# The workflow builds and tests the the sources on the following triggers:
3+
# - once a change is pushed to the main branch or any of its sub-branches
4+
name: Library development workflow
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main' # runs the workflow, once new changes have been integrated to main
10+
- 'main/**' # runs the workflow, once new changes have been integrated to a sub-branch of main
11+
pull_request:
12+
branches:
13+
- 'main' # run workflow in the scope of pull requests towards main
14+
workflow_call:
15+
secrets:
16+
APAX_TOKEN:
17+
required: true
18+
inputs:
19+
ref:
20+
required: true
21+
type: string
22+
23+
permissions:
24+
contents: read # required for checkout
25+
packages: read # required for pulling the container
26+
actions: write # required for artifact uploading
27+
28+
jobs:
29+
build-and-test:
30+
name: Build and Test
31+
runs-on: ubuntu-24.04
32+
container:
33+
image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2
34+
credentials:
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
steps:
38+
- name: Checkout Code
39+
uses: actions/checkout@v4
40+
with:
41+
# either check out a provided reference, or use the reference that triggered this workflow, e.g. a push, PR or a release
42+
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
43+
44+
- name: Login to required registries
45+
uses: simatic-ax/actions/apax-login@v3
46+
with:
47+
apax-token: ${{ secrets.APAX_TOKEN }}
48+
registries: |
49+
https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }}
50+
51+
- name: Install dependencies
52+
uses: simatic-ax/actions/apax-install@v3
53+
with:
54+
immutable: true
55+
56+
- name: Build source code
57+
uses: simatic-ax/actions/apax-build@v3
58+
with:
59+
apax-build-targets: |
60+
llvm
61+
1500
62+
apax-build-args: |
63+
--debug
64+
--log Debug
65+
66+
- name: Test source code
67+
uses: simatic-ax/actions/apax-test@v3
68+
with:
69+
coverage: true
70+
loglevel: debug
71+
72+
- name: Check links
73+
uses: gaurav-nelson/github-action-markdown-link-check@v1
74+
with:
75+
check-modified-files-only: 'yes'
76+
base-branch: 'main'
77+
78+
- name: Upload build artifacts
79+
if: ${{ github.event_name == 'workflow_call' || github.event_name == 'release'}}
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: build-artifacts
83+
path: |
84+
bin/1500
85+
bin/llvm
86+
retention-days: 90
87+
if-no-files-found: error
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This workflow is triggered when a release is published via the UI
2+
# The workflow is only executed if the release is a tag and the target_commitish is a release branch
3+
name: Release workflow
4+
5+
# Start the workflow as soon as a release has been published via the UI
6+
on:
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: write # required for checkout
12+
packages: write # required for pulling the container
13+
actions: write # required for artifact downloading
14+
pull-requests: write # Für PR-Erstellung und Management
15+
16+
jobs:
17+
call-development:
18+
name: Build the package
19+
uses: ./.github/workflows/package-development-workflow.yml
20+
secrets:
21+
APAX_TOKEN: ${{ secrets.APAX_TOKEN }}
22+
with:
23+
# checks out the branch that has been selected during the release process
24+
ref: ${{ github.event.release.target_commitish }}
25+
26+
release:
27+
name: Release the package
28+
needs: call-development
29+
runs-on: ubuntu-24.04
30+
container:
31+
image: ghcr.io/simatic-ax/ci-images/apax-ci-image:3.4.2
32+
credentials:
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
steps:
36+
- name: Checkout Code
37+
uses: actions/checkout@v4
38+
with:
39+
ref: ${{ github.event.release.target_commitish }}
40+
fetch-depth: 0
41+
42+
- name: Create bin folder
43+
run: mkdir -p bin
44+
45+
- name: Download build artifacts
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: build-artifacts
49+
path: bin
50+
51+
- name: Version package
52+
uses: simatic-ax/actions/apax-version@v3
53+
with:
54+
version: ${{ github.event.release.tag_name }}
55+
56+
- name: Package source code
57+
uses: simatic-ax/actions/apax-pack@v3
58+
with:
59+
key: ${{ secrets.APAX_SIGNKEY }}
60+
61+
- name: Login to required registries
62+
uses: simatic-ax/actions/apax-login@v3
63+
with:
64+
apax-token: ${{ secrets.APAX_TOKEN }}
65+
registries: |
66+
https://npm.pkg.github.com/,${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Publish apax package
69+
uses: simatic-ax/actions/apax-publish@v3
70+
with:
71+
registries: |
72+
https://npm.pkg.github.com

.github/workflows/release-library.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.markdownlint.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These owners will be the default owners for everything in the repo.
22
# Unless a later match takes precedence, the listed user will be
33
# requested for review when someone opens a pull request.
4-
* @sjuergen @BeckerStS @kruegerfelix @Schneefl0cke
4+
* @sjuergen @ReinerSchinkoethe @theBadT @BeckerStS

repolinter.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)