From f20b896e6685108fc97e48c1274af7fc37dd3b24 Mon Sep 17 00:00:00 2001 From: PiTrem Date: Fri, 4 Aug 2023 17:40:20 +0200 Subject: [PATCH 1/2] build: add github workflow for publishing --- .github/workflows/publish_package.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/publish_package.yml diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml new file mode 100644 index 0000000..54df6b4 --- /dev/null +++ b/.github/workflows/publish_package.yml @@ -0,0 +1,20 @@ +name: Publish + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.17.0 + registry-url: https://registry.npmjs.org/ + - run: yarn install + - run: yarn compile + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} From eb9cae25455d047e4e1e3d64cbfc50703f1b6baf Mon Sep 17 00:00:00 2001 From: PiTrem Date: Fri, 22 Sep 2023 16:42:13 +0200 Subject: [PATCH 2/2] ci: add github test workflow --- .github/workflows/publish_package.yml | 2 +- .github/workflows/test.yml | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/publish_package.yml b/.github/workflows/publish_package.yml index 54df6b4..0f468a4 100644 --- a/.github/workflows/publish_package.yml +++ b/.github/workflows/publish_package.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: 18.17.0 + node-version: 18.17.1 registry-url: https://registry.npmjs.org/ - run: yarn install - run: yarn compile diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e00d6d4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,18 @@ +name: jest + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.17.1 + - run: yarn install + - run: yarn test