Skip to content

Commit 75d30e6

Browse files
authored
Fix ci workflow (#263)
* build: set version for prerelease * ci: update actions, node versions and gh pages
1 parent b6e7384 commit 75d30e6

28 files changed

Lines changed: 185 additions & 166 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ on:
55
- main
66

77
jobs:
8-
build-and-deploy:
8+
build:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v4
13+
- name: Setup Pages
14+
uses: actions/configure-pages@v5
1315
- uses: actions/setup-node@v4
1416
with:
15-
node-version: 20.15.1
17+
node-version: 22
1618

1719
# This builds the project for projects/demo-maps and outputs the result to the 'dist' folder.
1820
# https://github.com/angular/angular-cli/issues/9016#issuecomment-526825531
@@ -22,8 +24,24 @@ jobs:
2224
npx ng build demo-maps --configuration=production --base-href=/ukis-frontend-libraries/
2325
find dist/demo-maps/ -maxdepth 1 -type f -exec mv {} dist/demo-maps/browser/ \;
2426
25-
- name: Deploy
26-
uses: JamesIves/github-pages-deploy-action@v4
27+
- name: Upload artifact
28+
# https://docs.github.com/de/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow
29+
# use this and not upload-artifact@v4 because so all metadata is set correctly
30+
uses: actions/upload-pages-artifact@v3
2731
with:
28-
branch: gh-pages # The branch the action should deploy to.
29-
folder: dist/demo-maps/browser # The folder the action should deploy.
32+
# Upload entire repository
33+
path: 'dist/demo-maps/browser'
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
permissions:
39+
contents: read
40+
pages: write
41+
id-token: write
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

.github/workflows/package-main-release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
git checkout ${{ needs.checkTitelTag.outputs.VERSION_TAG }}
6969
- uses: actions/setup-node@v4
7070
with:
71-
node-version: 20.15.1
71+
node-version: 22
7272
- run: rm -f .npmrc
7373
- uses: ./.github/actions/check-tag-on-npm
7474
with:
@@ -88,13 +88,13 @@ jobs:
8888
git checkout ${{ needs.checkTitelTag.outputs.VERSION_TAG }}
8989
- uses: actions/setup-node@v4
9090
with:
91-
node-version: 20.15.1
91+
node-version: 22
9292
- name: build
9393
run: |
9494
npm ci
9595
npm run build
9696
- name: Archive dist artifacts
97-
uses: actions/upload-artifact@v3
97+
uses: actions/upload-artifact@v4
9898
with:
9999
name: "dist"
100100
path: dist
@@ -129,7 +129,7 @@ jobs:
129129
git fetch --all --tags
130130
git checkout ${{ needs.checkTitelTag.outputs.VERSION_TAG }}
131131
- name: Release
132-
uses: softprops/action-gh-release@v1
132+
uses: softprops/action-gh-release@v2
133133
with:
134134
tag_name: ${{ needs.checkTitelTag.outputs.VERSION_TAG }}
135135

@@ -140,13 +140,13 @@ jobs:
140140
steps:
141141
- uses: actions/checkout@v4
142142
- name: Download dist result from job build
143-
uses: actions/download-artifact@v3
143+
uses: actions/download-artifact@v4
144144
with:
145145
name: "dist"
146146
path: dist
147147
- uses: actions/setup-node@v4
148148
with:
149-
node-version: 20.15.1
149+
node-version: 22
150150
registry-url: https://npm.pkg.github.com/
151151
scope: "@dlr-eoc"
152152
- run: npm ci
@@ -171,13 +171,13 @@ jobs:
171171
steps:
172172
- uses: actions/checkout@v4
173173
- name: Download dist result from job build
174-
uses: actions/download-artifact@v3
174+
uses: actions/download-artifact@v4
175175
with:
176176
name: "dist"
177177
path: dist
178178
- uses: actions/setup-node@v4
179179
with:
180-
node-version: 20.15.1
180+
node-version: 22
181181
registry-url: https://registry.npmjs.org/
182182
scope: "@dlr-eoc"
183183
- run: npm ci

.github/workflows/package-pre-release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4
1818
with:
19-
node-version: 20.15.1
19+
node-version: 22
2020
- run: rm -f .npmrc
2121
- uses: ./.github/actions/check-tag-on-npm
2222
with:
@@ -30,7 +30,7 @@ jobs:
3030
if: startsWith(github.ref, 'refs/tags/')
3131
steps:
3232
- name: Release
33-
uses: softprops/action-gh-release@v1
33+
uses: softprops/action-gh-release@v2
3434
with:
3535
prerelease: true
3636

@@ -41,14 +41,14 @@ jobs:
4141
- uses: actions/checkout@v4
4242
- uses: actions/setup-node@v4
4343
with:
44-
node-version: 20.15.1
44+
node-version: 22
4545
- uses: ./.github/actions/test
4646
- name: build
4747
run: |
4848
npm ci
4949
npm run build
5050
- name: Archive dist artifacts
51-
uses: actions/upload-artifact@v3
51+
uses: actions/upload-artifact@v4
5252
with:
5353
name: "dist"
5454
path: dist
@@ -59,13 +59,13 @@ jobs:
5959
steps:
6060
- uses: actions/checkout@v4
6161
- name: Download dist result from job build
62-
uses: actions/download-artifact@v3
62+
uses: actions/download-artifact@v4
6363
with:
6464
name: "dist"
6565
path: dist
6666
- uses: actions/setup-node@v4
6767
with:
68-
node-version: 20.15.1
68+
node-version: 22
6969
registry-url: https://npm.pkg.github.com/
7070
scope: "@dlr-eoc"
7171
- run: npm ci
@@ -90,13 +90,13 @@ jobs:
9090
steps:
9191
- uses: actions/checkout@v4
9292
- name: Download dist result from job build
93-
uses: actions/download-artifact@v3
93+
uses: actions/download-artifact@v4
9494
with:
9595
name: "dist"
9696
path: dist
9797
- uses: actions/setup-node@v4
9898
with:
99-
node-version: 20.15.1
99+
node-version: 22
100100
registry-url: https://registry.npmjs.org/
101101
scope: "@dlr-eoc"
102102
- run: npm ci

.github/workflows/test-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-node@v4
2121
with:
22-
node-version: 20.15.1
22+
node-version: 22
2323
- uses: ./.github/actions/test
2424
- uses: ./.github/actions/build

0 commit comments

Comments
 (0)