Skip to content

Commit

Permalink
fix: issue with power apps and test in ci (#440)
Browse files Browse the repository at this point in the history
* fix: issue with power apps and test in ci

* chore: rename ci job
  • Loading branch information
nmerget authored Feb 15, 2023
1 parent a791fe6 commit 1b2f74a
Show file tree
Hide file tree
Showing 6 changed files with 438 additions and 25 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/01-build-power-apps.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Deploy Power Apps
name: Build Power Apps

on:
workflow_call:
Expand All @@ -9,8 +9,8 @@ on:
type: string

jobs:
build-showcases:
name: Deploy Power Apps
build-power-apps:
name: Build Power Apps
runs-on: ubuntu-latest
steps:
- name: ⬇ Checkout repo
Expand Down Expand Up @@ -51,18 +51,6 @@ jobs:
name: db-ui-powerapps
path: build-power-apps/DBUI

- name: ⬆ Upload Release Asset
id: upload-release-asset
uses: actions/github-script@v6
with:
result-encoding: json
script: |
const { default: uploadAsset } = await import('${{ github.workspace }}/.github/scripts/upload-asset.js');
const release_id = context.payload.release.id;
const assetName = 'DBUI.zip';
const assetPath = '${{ github.workspace }}/build-power-apps/DBUI/bin/Release/DBUI.zip';
return await uploadAsset({github, context, release_id, assetName, assetPath});
- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/03-publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
name: db-ui-outputs
path: build-outputs

- name: ⬇ Download Power Apps zip
uses: ./.github/actions/download-tar-artifact
with:
name: db-ui-powerapps
path: build-power-apps/DBUI

- name: 📰 Publish to NPM Registries
run: |
chmod +rx ./.github/scripts/publish-npm.sh
Expand All @@ -44,6 +50,18 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: ⬆ Upload Power Apps Release Asset
id: upload-release-asset
uses: actions/github-script@v6
with:
result-encoding: json
script: |
const { default: uploadAsset } = await import('${{ github.workspace }}/.github/scripts/upload-asset.js');
const release_id = context.payload.release.id;
const assetName = 'DBUI.zip';
const assetPath = '${{ github.workspace }}/build-power-apps/DBUI/bin/Release/DBUI.zip';
return await uploadAsset({github, context, release_id, assetName, assetPath});
- name: 💀 Killing me softly
uses: ./.github/actions/cancel-workflow
if: failure()
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,19 @@ jobs:
uses: ./.github/workflows/01-build-showcases.yml
needs: [build-packages]

build-power-apps:
uses: ./.github/workflows/01-build-power-apps.yml
needs: [build-packages]
secrets: inherit
with:
version: 0.0.0-test

checks-done:
runs-on: ubuntu-latest
steps:
- name: 🎉 Checks done
run: echo "🎉 All tests were successful."
needs: [build-showcases, build-outputs, test-packages]
needs: [build-showcases, build-outputs, test-packages, build-power-apps]

deploy:
uses: ./.github/workflows/03-deploy-gh-pages.yml
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,19 @@ jobs:
uses: ./.github/workflows/02-e2e.yml
needs: [build-packages]

build-power-apps:
uses: ./.github/workflows/01-build-power-apps.yml
needs: [get-publish-version, build-packages]
secrets: inherit
with:
version: ${{ needs.get-publish-version.outputs.version }}

checks-done:
runs-on: ubuntu-latest
steps:
- name: 🎉 Checks done
run: echo "🎉 All builds were successful."
needs: [test-packages, build-outputs, build-showcases]
needs: [test-packages, build-outputs, build-showcases, build-power-apps]

deploy:
uses: ./.github/workflows/03-deploy-gh-pages.yml
Expand All @@ -50,13 +57,6 @@ jobs:
release: ${{ needs.get-publish-version.outputs.release }}
preRelease: ${{ needs.get-publish-version.outputs.preRelease }}

build-power-apps:
uses: ./.github/workflows/01-build-power-apps.yml
needs: [get-publish-version, checks-done, build-packages]
secrets: inherit
with:
version: ${{ needs.get-publish-version.outputs.version }}

publishpackages:
uses: ./.github/workflows/03-publish-packages.yml
needs: [get-publish-version, checks-done, build-outputs]
Expand Down
Loading

0 comments on commit 1b2f74a

Please sign in to comment.