From 5a047d71b5a99e854116de997f2bf6564170fd97 Mon Sep 17 00:00:00 2001 From: Seva D <43249611+vaguue@users.noreply.github.com> Date: Fri, 5 Jan 2024 00:49:05 +0300 Subject: [PATCH] Create ci.yml --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..de5e8c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "release" ] + pull_request: + branches: [ "release" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: v21.5.0 + cache: 'npm' + - run: npm ci + - run: npm run test-cov + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - run: npm run bundle --if-present + - name: Checkout code + uses: actions/checkout@v2 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + 🚀 This release contains necessary files to import struct-compile to your project. See README.md of this repo for more details. + draft: true + prerelease: false