diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a39226f61b9f4bcd31d5b35b90fa60e8219ab190..20359ce4fe382ad91fac226c9d12fd3af3c3d08e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,6 +15,8 @@ updates: - "dependencies" - "github-actions" target-branch: "dependabot" + pull-request-branch-name: + separator: "-" - package-ecosystem: "npm" directory: "/" @@ -26,6 +28,8 @@ updates: - "dependencies" - "npm" target-branch: "dependabot" + pull-request-branch-name: + separator: "-" - package-ecosystem: "docker" directory: "/" @@ -37,3 +41,5 @@ updates: - "dependencies" - "docker" target-branch: "dependabot" + pull-request-branch-name: + separator: "-" diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml deleted file mode 100644 index 3af553af38d716c9da9dbe91ec43ad87eb24fbbf..0000000000000000000000000000000000000000 --- a/.github/workflows/dev-build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Create Dev-Build - -on: - push: - branches: - - develop - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - # DOCKER RELATED - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile.develop - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: | - ghcr.io/griefed/ltt-mapmaker:develop - ghcr.io/griefed/ltt-mapmaker:develop-${{ github.sha }} diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml index a21f69f7e06311554362fbc33191c9da1e891ac3..d493b89b320e8db28ec8c4b2ab2e3cb97030d30d 100644 --- a/.github/workflows/github_release.yml +++ b/.github/workflows/github_release.yml @@ -68,6 +68,12 @@ jobs: - name: List files run: pwd && ls -al * + - uses: actions/upload-artifact@v2 + with: + name: build-artifacts-quasar + path: dist/spa/ + if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` + # NGINX Archives - name: Create NGINX Archive tar.gz run: | @@ -129,6 +135,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + build-args: BRANCH_OR_TAG=${{ github.ref_name }} file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 push: true @@ -172,6 +179,14 @@ jobs: - name: List files run: ls dist/electron + - uses: actions/upload-artifact@v2 + with: + name: build-artifacts-electron ${{ matrix.os }} + path: | + dist/electron/ + !dist/electron/UnPackaged + if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` + - name: Rename folders run: | mv dist/electron/Let* lttmm-${{ matrix.os }} diff --git a/.github/workflows/major.yml b/.github/workflows/major.yml deleted file mode 100644 index 51847ab6e136b2df025722ce7d877973ff1eb9c6..0000000000000000000000000000000000000000 --- a/.github/workflows/major.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Major Release - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - # GET LATEST CODE - - name: Checkout latest code - uses: actions/checkout@master - with: - fetch-depth: 0 - - # GENERATE CHANGELOG, TAG, RELEASE - - id: conventional_changelog - uses: ardalanamini/auto-changelog@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - - id: compute_tag - uses: craig-day/compute-tag@v13 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - version_scheme: semantic - version_type: major - # MAJOR.MINOR.PATCH - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.compute_tag.outputs.next_tag }} - body: | - Automatic release of version: **${{ steps.compute_tag.outputs.next_tag }}** - **Changes in this release:** - ${{ steps.conventional_changelog.outputs.changelog }} - draft: false - prerelease: false - - - name: Setup Node.js environment - uses: actions/setup-node@v2.5.0 - with: - # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 - node-version: '>= 16.9.1' - # Set this option if you want the action to check for the latest available version that satisfies the version spec - check-latest: false - - - name: Install Quasar - run: npm install -g @quasar/cli - - - name: Install packages - run: npm install - - - name: Build project - run: quasar build - - - name: List files - run: pwd && ls -al * - - - name: Create Build Archive tar.gz - run: | - echo "**** Creating archive of quasar build ****" - tar -czf lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz dist/spa - - - name: Create Build Archive zip - uses: papeloto/action-zip@v1 - with: - files: dist/spa - recursive: true - dest: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - - - name: Upload Release Archive tar.gz - id: upload-release-asset-archive-targz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Release Archive zip - id: upload-release-asset-archive-zip - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_content_type: application/zip - - # DOCKER RELATED - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: griefed - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: | - ghcr.io/griefed/ltt-mapmaker:latest - ghcr.io/griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} - griefed/ltt-mapmaker:latest - griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} diff --git a/.github/workflows/minor.yml b/.github/workflows/minor.yml deleted file mode 100644 index ab45de1d87bc72079ee5bc190a04f9a8a61be409..0000000000000000000000000000000000000000 --- a/.github/workflows/minor.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Minor Release - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - # GET LATEST CODE - - name: Checkout latest code - uses: actions/checkout@master - with: - fetch-depth: 0 - - # GENERATE CHANGELOG, TAG, RELEASE - - id: conventional_changelog - uses: ardalanamini/auto-changelog@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - - id: compute_tag - uses: craig-day/compute-tag@v13 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - version_scheme: semantic - version_type: minor - # MAJOR.MINOR.PATCH - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.compute_tag.outputs.next_tag }} - body: | - Automatic release of version: **${{ steps.compute_tag.outputs.next_tag }}** - **Changes in this release:** - ${{ steps.conventional_changelog.outputs.changelog }} - draft: false - prerelease: false - - - name: Setup Node.js environment - uses: actions/setup-node@v2.5.0 - with: - # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 - node-version: '>= 16.9.1' - # Set this option if you want the action to check for the latest available version that satisfies the version spec - check-latest: false - - - name: Install Quasar - run: npm install -g @quasar/cli - - - name: Install packages - run: npm install - - - name: Build project - run: quasar build - - - name: List files - run: pwd && ls -al * - - - name: Create Build Archive tar.gz - run: | - echo "**** Creating archive of quasar build ****" - tar -czf lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz dist/spa - - - name: Create Build Archive zip - uses: papeloto/action-zip@v1 - with: - files: dist/spa - recursive: true - dest: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - - - name: Upload Release Archive tar.gz - id: upload-release-asset-archive-targz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Release Archive zip - id: upload-release-asset-archive-zip - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_content_type: application/zip - - # DOCKER RELATED - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: griefed - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: | - ghcr.io/griefed/ltt-mapmaker:latest - ghcr.io/griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} - griefed/ltt-mapmaker:latest - griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml deleted file mode 100644 index 11833b7198fb4d089c0b4118756c42cf85e4234a..0000000000000000000000000000000000000000 --- a/.github/workflows/patch.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Patch Release - -on: - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - # GET LATEST CODE - - name: Checkout latest code - uses: actions/checkout@master - with: - fetch-depth: 0 - - # GENERATE CHANGELOG, TAG, RELEASE - - id: conventional_changelog - uses: ardalanamini/auto-changelog@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - - id: compute_tag - uses: craig-day/compute-tag@v13 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - version_scheme: semantic - version_type: patch - # MAJOR.MINOR.PATCH - - name: Create Release - id: create_release - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.compute_tag.outputs.next_tag }} - body: | - Automatic release of version: **${{ steps.compute_tag.outputs.next_tag }}** - **Changes in this release:** - ${{ steps.conventional_changelog.outputs.changelog }} - draft: false - prerelease: false - - - name: Setup Node.js environment - uses: actions/setup-node@v2.5.0 - with: - # Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 - node-version: '>= 16.9.1' - # Set this option if you want the action to check for the latest available version that satisfies the version spec - check-latest: false - - - name: Install Quasar - run: npm install -g @quasar/cli - - - name: Install packages - run: npm install - - - name: Build project - run: quasar build - - - name: List files - run: pwd && ls -al * - - - name: Create Build Archive tar.gz - run: | - echo "**** Creating archive of quasar build ****" - tar -czf lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz dist/spa - - - name: Create Build Archive zip - uses: papeloto/action-zip@v1 - with: - files: dist/spa - recursive: true - dest: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - - - name: Upload Release Archive tar.gz - id: upload-release-asset-archive-targz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.tar.gz - asset_content_type: application/gzip - - - name: Upload Release Archive zip - id: upload-release-asset-archive-zip - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_name: lttmm-${{ steps.compute_tag.outputs.next_tag }}.zip - asset_content_type: application/zip - - # DOCKER RELATED - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: griefed - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: true - tags: | - ghcr.io/griefed/ltt-mapmaker:latest - ghcr.io/griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} - griefed/ltt-mapmaker:latest - griefed/ltt-mapmaker:${{ steps.compute_tag.outputs.next_tag }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf32b61cf4abfadbe2ea5256a0cd4ca3910a7abe..f332d07178ef6a00758db524958810b58807fde1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,13 +2,7 @@ name: Test on: push: - branches: - - master - - develop pull_request: - branches: - - master - - develop workflow_dispatch: jobs: @@ -27,19 +21,41 @@ jobs: - run: npm install - run: quasar build - run: pwd && ls -al * + - uses: actions/upload-artifact@v2 + with: + name: build-artifacts-quasar + path: dist/spa/ + if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` # DOCKER RELATED - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Build + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: griefed + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v2 with: context: . + build-args: BRANCH_OR_TAG=${{ github.ref_name }} file: ./Dockerfile platforms: linux/amd64,linux/arm/v7,linux/arm64 - push: false + push: true + tags: | + ghcr.io/griefed/ltt-mapmaker:${{ github.ref_name }} + ghcr.io/griefed/ltt-mapmaker:${{ github.ref_name }}-${{ github.sha }} + griefed/ltt-mapmaker:${{ github.ref_name }} + griefed/ltt-mapmaker:${{ github.ref_name }}-${{ github.sha }} electron: needs: test @@ -99,3 +115,11 @@ jobs: - name: List files run: ls + + - uses: actions/upload-artifact@v2 + with: + name: build-artifacts-electron ${{ matrix.os }} + path: | + dist/electron/ + !dist/electron/UnPackaged + if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` diff --git a/Dockerfile b/Dockerfile index 8b0ed9bcd425cf84b1d617198d11a0249b980108..015b896f7fee9c10511812eaad30ee1df27bf883 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,22 @@ FROM node:16.12.0-alpine3.13 AS builder +ARG BRANCH_OR_TAG=master + RUN \ apk add \ git \ npm && \ git clone \ - https://github.com/Griefed/ltt-mapmaker.git \ - /tmp/lttmm && \ + -b $BRANCH_OR_TAG \ + https://github.com/Griefed/ltt-mapmaker.git \ + /tmp/lttmm && \ cd /tmp/lttmm && \ npm install -g npm@7.23.0 && \ npm install -g @quasar/cli && \ npm install && \ quasar build -FROM lsiobase/nginx:3.15-php8-version-ef5b8f3b +FROM lsiobase/nginx:3.15 LABEL maintainer="Griefed <griefed@griefed.de>" diff --git a/Dockerfile.develop b/Dockerfile.develop deleted file mode 100644 index d8078b6f79ac0d43157b27df7aa5ca78145f1867..0000000000000000000000000000000000000000 --- a/Dockerfile.develop +++ /dev/null @@ -1,34 +0,0 @@ -FROM node:16.12.0-alpine3.13 AS builder - -RUN \ - apk add \ - git \ - npm && \ - git clone \ - -b develop \ - https://github.com/Griefed/ltt-mapmaker.git \ - /tmp/lttmm && \ - cd /tmp/lttmm && \ - npm install -g npm@7.23.0 && \ - npm install -g @quasar/cli && \ - npm install && \ - quasar build - -FROM lsiobase/nginx:3.15-php8-version-ef5b8f3b - -LABEL maintainer="Griefed <griefed@griefed.de>" - -RUN \ - mkdir -p \ - /app/lttmm && \ - echo "**** Cleanup ****" && \ - rm -rf \ - /root/.cache \ - /tmp/* - -COPY --from=builder tmp/lttmm/dist/spa/ /app/lttmm -COPY root/ / - -EXPOSE 80 443 - -VOLUME /config