From af77b310f9cdf94c72d8b9031b8a09f0f7355ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 08:44:56 +0200 Subject: [PATCH 1/8] ci: add workshop file --- .github/workflows/workshop.yaml | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/workshop.yaml diff --git a/.github/workflows/workshop.yaml b/.github/workflows/workshop.yaml new file mode 100644 index 0000000..2c6fecf --- /dev/null +++ b/.github/workflows/workshop.yaml @@ -0,0 +1,41 @@ +name: Workshop +on: + push: + branches: + - main + pull_request: {} + +env: + GREETING: Hello + +jobs: + print-greeting: + name: Print greeting + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Print + run: echo $GREETING + + save-greeting: + name: Save greeting + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Save to file + run: echo $GREETING > greeting.txt + + - name: Store artifact + uses: actions/upload-artifact@v2 + if: always() + with: + name: greetingfile + path: greeting.txt \ No newline at end of file From c5f6b6e45b7c173cba7b8f850a61a91e1d4c7d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 08:49:55 +0200 Subject: [PATCH 2/8] ci: add build workflow --- .github/workflows/build.yaml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..975f3d9 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,44 @@ +name: Build +on: + push: + branches: + - main + pull_request: {} + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 7 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + if: steps.cache-dist.outputs.cache-hit != 'true' + run: pnpm build + + - name: Cache dist folder + id: cache-dist + uses: actions/cache@v3 + env: + cache-name: cache-dist + with: + path: dist + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm-lock.yaml') }} + \ No newline at end of file From 397cfcd7c112f6fd278e7ea1d790c5c9c8ccedb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 08:57:11 +0200 Subject: [PATCH 3/8] ci: add caching --- .github/workflows/build.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 975f3d9..6bb09fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,4 +41,10 @@ jobs: with: path: dist key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm-lock.yaml') }} - \ No newline at end of file + + - name: Upload dist artifact + uses: actions/upload-artifact@v2 + if: always() + with: + name: dist + path: dist \ No newline at end of file From cd6b6c17807990873335b283d3b65f51e97213df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 09:01:27 +0200 Subject: [PATCH 4/8] ci: change order --- .github/workflows/build.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6bb09fc..ac3b548 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,10 +29,6 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Build - if: steps.cache-dist.outputs.cache-hit != 'true' - run: pnpm build - - name: Cache dist folder id: cache-dist uses: actions/cache@v3 @@ -41,6 +37,11 @@ jobs: with: path: dist key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Run build + if: steps.cache-dist.outputs.cache-hit != 'true' + run: pnpm build + - name: Upload dist artifact uses: actions/upload-artifact@v2 From 668ececd4915490516f9bd672f2e565f8a61b9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 09:10:55 +0200 Subject: [PATCH 5/8] ci: change node and pnpm step --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ac3b548..b8d7649 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,17 +15,17 @@ jobs: with: fetch-depth: 0 - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 7 - - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 cache: 'pnpm' + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 7 + - name: Install dependencies run: pnpm install --frozen-lockfile From a15663f7c462fca03949409788f29b075f19699f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 09:11:47 +0200 Subject: [PATCH 6/8] ci: revert --- .github/workflows/build.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b8d7649..ac3b548 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,17 +15,17 @@ jobs: with: fetch-depth: 0 + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 7 + - name: Setup Node uses: actions/setup-node@v3 with: node-version: 16 cache: 'pnpm' - - name: Install pnpm - uses: pnpm/action-setup@v2 - with: - version: 7 - - name: Install dependencies run: pnpm install --frozen-lockfile From ec2ad882c1f6d78b67ba0a3d41c37327705b4824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 10:31:33 +0200 Subject: [PATCH 7/8] ci: test --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ac3b548..3cbf664 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: branches: - main pull_request: {} - +# jobs: build: name: Build From 145f9d78e5ab0d0479f80fbab42fb8b813e9f3a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerrit=20Schr=C3=B6er?= Date: Fri, 28 Apr 2023 11:55:42 +0200 Subject: [PATCH 8/8] ci: enabke --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3cbf664..ac3b548 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: branches: - main pull_request: {} -# + jobs: build: name: Build