diff --git a/.gitea/workflows/action_push.yml b/.gitea/workflows/action_push.yml new file mode 100644 index 0000000..bb853c9 --- /dev/null +++ b/.gitea/workflows/action_push.yml @@ -0,0 +1,11 @@ +name: Push Action + +on: + push: + tags-ignore: + - 'v*' + +jobs: + test: + uses: ./.gitea/workflows/test.yml + diff --git a/.gitea/workflows/action_tag.yml b/.gitea/workflows/action_tag.yml new file mode 100644 index 0000000..f31ba44 --- /dev/null +++ b/.gitea/workflows/action_tag.yml @@ -0,0 +1,16 @@ +name: Tag Action + +on: + push: + tags: + - v* + +jobs: + test: + uses: ./.gitea/workflows/test.yml + release_code: + needs: test + uses: ./.gitea/workflows/release_code.yml.yml + release_amd: + needs: test + uses: ./.gitea/workflows/release_amd.yml.yml \ No newline at end of file diff --git a/.gitea/workflows/release_amd.yml b/.gitea/workflows/release_amd.yml new file mode 100644 index 0000000..e418fe1 --- /dev/null +++ b/.gitea/workflows/release_amd.yml @@ -0,0 +1,36 @@ +name: Outbag AMD Release + +on: + workflow_call: + inputs: + secrets: + + +jobs: + release-amd: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Dependencies + run: npm ci + + - name: Build + run: | + mkdir build + npm run bundleRelease + + - name: Build AMD + run: | + npm run build-amd + mkdir upload + cp build/bin/* upload + + - name: Create Release + id: gitea-release + uses: akkuman/gitea-release-action@v1 + with: + files: | + upload/** + api_key: '${{ secrets.RELEASE_TOKEN }}' diff --git a/.gitea/workflows/release_code.yml b/.gitea/workflows/release_code.yml new file mode 100644 index 0000000..d558b22 --- /dev/null +++ b/.gitea/workflows/release_code.yml @@ -0,0 +1,43 @@ +name: Outbag Code release + +on: + workflow_call: + inputs: + secrets: + +jobs: + release-amd: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Dependencies + run: npm ci + + - name: Build + run: | + mkdir build + npm run prepublish + + - name: Build Code + run: | + apt-get update + apt-get install zip tar -y + mkdir outbag_server + mkdir outbag_server/dist + mkdir upload + cp -r dist/* outbag_server/dist + cp package.json outbag_server + cp package-lock.json outbag_server + cp readme.md outbag_server + zip -r upload/OutbagServer.zip outbag_server/* + tar -czvf upload/OutbagServer.tar.gz outbag_server/* + + - name: Create Release + id: gitea-release + uses: akkuman/gitea-release-action@v1 + with: + files: | + upload/** + api_key: '${{ secrets.RELEASE_TOKEN }}' diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yml similarity index 94% rename from .gitea/workflows/test.yaml rename to .gitea/workflows/test.yml index 7a6c119..76b44ac 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yml @@ -1,6 +1,9 @@ name: Outbag Tests -on: [push] +on: + workflow_call: + inputs: + secrets: jobs: test: