From f467ce66094822a848f0fb72197eb6e09a365cda Mon Sep 17 00:00:00 2001 From: ManInDark <61268856+ManInDark@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:36:22 +0100 Subject: [PATCH] added extensions to devcontainer and added github action build script --- .devcontainer/devcontainer.json | 13 +++++++------ .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fb08e0a..162d1b5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,22 +4,23 @@ "name": "React", "image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm", - // Features to add to the dev container. More info: https://containers.dev/features. "features": { }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [5173], "customizations": { "vscode": { "settings": { "terminal.integrated.shell.linux": "/bin/bash" - } + }, + "extensions": [ + "GitHub.vscode-github-actions", + "dbaeumer.vscode-eslint", + "GitHub.copilot", + "ms-vscode-remote.remote-containers" + ] } }, "postCreateCommand": "npm install" - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1975fd9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +on: + push: + tags: + - 'v*.*.*' + +jobs: + create_release: + runs-on: ubuntu-latest + container: + image: "node:22-alpine3.19" + permissions: + contents: write + steps: + - name: Create Release + uses: ncipollo/release-action@v1 + - name: Checkout code + uses: actions/checkout@v4 + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Create tarball + run: | + apk update && apk add xz + tar -Javcf archive.tar -C dist . + - name: Upload Release Asset + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: archive.tar + overwrite: false \ No newline at end of file