From 12eaa1b3d5a9de61897aa1d11b5cc2276adb7464 Mon Sep 17 00:00:00 2001 From: Arindy Date: Sat, 1 Mar 2025 19:28:34 +0100 Subject: [PATCH] initial ci --- .github/workflows/ci.yaml | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..7874ff8 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,47 @@ +name: ci +on: [ push, pull_request ] + +jobs: + ci: + runs-on: ubuntu-latest + + permissions: + contents: read + pull-requests: write + statuses: write + + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: version + run: | + content=`cat ./path/to/package.json` + # the following lines are only required for multi line json + content="${content//'%'/'%25'}" + content="${content//$'\n'/'%0A'}" + content="${content//$'\r'/'%0D'}" + echo ${{fromJSON(content).version}} + + - name: npm install + run: npm install + - name: build + run: npm run build + + - name: Archive Release + if: github.ref_name == main + uses: thedoctor0/zip-release@0.7.5 + with: + type: 'zip' + filename: 'release.zip' + directory: 'dist' + + - uses: ncipollo/release-action@v1 + with: + tag: '' + +