From 335380c3588a99887417573bbab1f3394182ff5a Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 19:11:12 +0200 Subject: [PATCH 1/7] Create build-release-files.yml --- .github/workflows/build-release-files.yml | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/build-release-files.yml diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml new file mode 100644 index 0000000..1f80dde --- /dev/null +++ b/.github/workflows/build-release-files.yml @@ -0,0 +1,58 @@ +name: Build files and add to release + +on: + release: + types: + - created + - published + +jobs: + run-linter: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - uses: denoland/setup-deno@v1 + with: + deno-version: vx.x.x + + - uses: actions/setup-node@v3 + with: + node-version: "latest" + + - name: Create directories + run: mkdir -p /out/notify + + - name: Compile Deno and copy to output + run: deno compile --allow-net --allow-read --allow-write --allow-env --unstable --output /out/notify/notify ./main.ts + working-directory: ./app/backend + + - name: Install frontend dependencies + run: npm install + working-directory: ./app/frontend + + - name: Build frontend + run: npm run build + working-directory: ./app/frontend + + - name: Copy frontend files + run: cp -r ./app/frontend/build/* /out/notify/static-files + + - name: Archive files + run: tar -czf /out/notify/notify.tar.gz -C /out/notify . + + - name: Add artifact + uses: actions/upload-artifact@v2 + with: + name: notify + path: /out/notify/notify.tar.gz + + # - name: Upload release files + # uses: actions/upload-release-asset@v1 + # with: + # upload_url: ${{ github.event.release.upload_url }} + # asset_path: /out/notify/notify.tar.gz + # asset_name: notify.tar.gz + # asset_content_type: application/gzip + # token: ${{ secrets.GITHUB_TOKEN }} From bb7297a2f1c59b1382e63e45897f31e631b5dbbb Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 19:13:02 +0200 Subject: [PATCH 2/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index 1f80dde..5e7ce9e 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -1,11 +1,12 @@ name: Build files and add to release on: - release: - types: - - created - - published - + # release: + # types: + # - created + # - published + push: + jobs: run-linter: runs-on: ubuntu-latest @@ -47,7 +48,7 @@ jobs: with: name: notify path: /out/notify/notify.tar.gz - + # - name: Upload release files # uses: actions/upload-release-asset@v1 # with: From cb17ac72527f0a9aed6b2f1ddc6a7f691ec8e2bc Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 19:32:00 +0200 Subject: [PATCH 3/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index 5e7ce9e..229590e 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -23,10 +23,10 @@ jobs: node-version: "latest" - name: Create directories - run: mkdir -p /out/notify + run: mkdir -p ~/out/notify - name: Compile Deno and copy to output - run: deno compile --allow-net --allow-read --allow-write --allow-env --unstable --output /out/notify/notify ./main.ts + run: deno compile --allow-net --allow-read --allow-write --allow-env --unstable --output ~/out/notify/notify ./main.ts working-directory: ./app/backend - name: Install frontend dependencies @@ -38,10 +38,10 @@ jobs: working-directory: ./app/frontend - name: Copy frontend files - run: cp -r ./app/frontend/build/* /out/notify/static-files + run: cp -r ./app/frontend/build/* ~/out/notify/static-files - name: Archive files - run: tar -czf /out/notify/notify.tar.gz -C /out/notify . + run: tar -czf ~/out/notify/notify.tar.gz -C /out/notify . - name: Add artifact uses: actions/upload-artifact@v2 From f19c213664e4ee8f7d29fbc8e9dc5c140cc32c54 Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 19:45:41 +0200 Subject: [PATCH 4/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index 229590e..f08df73 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -8,7 +8,7 @@ on: push: jobs: - run-linter: + build-release-files: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -23,7 +23,7 @@ jobs: node-version: "latest" - name: Create directories - run: mkdir -p ~/out/notify + run: mkdir -p ~/out/notify ~/out/notify/static-files - name: Compile Deno and copy to output run: deno compile --allow-net --allow-read --allow-write --allow-env --unstable --output ~/out/notify/notify ./main.ts From 99549f1d1cfd1e788222efffa8082dd1d2dda97c Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 19:47:08 +0200 Subject: [PATCH 5/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index f08df73..2283669 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -41,13 +41,14 @@ jobs: run: cp -r ./app/frontend/build/* ~/out/notify/static-files - name: Archive files - run: tar -czf ~/out/notify/notify.tar.gz -C /out/notify . + run: tar -czf ~/out/notify/notify.tar.gz -C ~/out/notify . - name: Add artifact uses: actions/upload-artifact@v2 with: name: notify - path: /out/notify/notify.tar.gz + path: ~/out/notify/notify.tar.gz + # - name: Upload release files # uses: actions/upload-release-asset@v1 From e3561e78b1f705ecb99609c3699958c5bbc6591e Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 20:27:25 +0200 Subject: [PATCH 6/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index 2283669..2d04c72 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -41,13 +41,13 @@ jobs: run: cp -r ./app/frontend/build/* ~/out/notify/static-files - name: Archive files - run: tar -czf ~/out/notify/notify.tar.gz -C ~/out/notify . + run: tar -czf ~/out/notify.tar.gz -C ~/out/notify . - name: Add artifact uses: actions/upload-artifact@v2 with: name: notify - path: ~/out/notify/notify.tar.gz + path: ~/out/notify.tar.gz # - name: Upload release files From 30983f6808d57905ea39f66fc6a0fd89130bb2d0 Mon Sep 17 00:00:00 2001 From: K0IN Date: Sun, 23 Jun 2024 21:39:55 +0200 Subject: [PATCH 7/7] Update build-release-files.yml --- .github/workflows/build-release-files.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-release-files.yml b/.github/workflows/build-release-files.yml index 2d04c72..9ba0f72 100644 --- a/.github/workflows/build-release-files.yml +++ b/.github/workflows/build-release-files.yml @@ -6,7 +6,7 @@ on: # - created # - published push: - + jobs: build-release-files: runs-on: ubuntu-latest @@ -23,7 +23,7 @@ jobs: node-version: "latest" - name: Create directories - run: mkdir -p ~/out/notify ~/out/notify/static-files + run: mkdir -p ~/out/notify ~/out/notify/frontend/build - name: Compile Deno and copy to output run: deno compile --allow-net --allow-read --allow-write --allow-env --unstable --output ~/out/notify/notify ./main.ts @@ -38,18 +38,17 @@ jobs: working-directory: ./app/frontend - name: Copy frontend files - run: cp -r ./app/frontend/build/* ~/out/notify/static-files + run: cp -r ./app/frontend/build/* ~/out/notify/frontend/build - name: Archive files run: tar -czf ~/out/notify.tar.gz -C ~/out/notify . - + - name: Add artifact uses: actions/upload-artifact@v2 with: name: notify path: ~/out/notify.tar.gz - # - name: Upload release files # uses: actions/upload-release-asset@v1 # with: