From 5155424799fb2f611d4f6cf83f1a064d25b56112 Mon Sep 17 00:00:00 2001 From: dev-AshishRanjan <94990764+dev-AshishRanjan@users.noreply.github.com> Date: Wed, 17 Jan 2024 02:52:57 +0530 Subject: [PATCH] feat: github actions --- .github/workflows/build.yml | 39 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c39bd34 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build +on: [push, pull_request] + +jobs: + build_on_linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: build + run: npm run make + + build_on_mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: build + run: npm run make + + build_on_win: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: build + run: npm run make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5f3ec2e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Release +on: + push: + tags: + - 'v*' + +jobs: + + publish_on_linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run publish + + publish_on_mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run publish + + publish_on_win: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@master + with: + node-version: 14 + - name: install dependencies + run: npm install + - name: publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npm run publish \ No newline at end of file