From a19409918fd7003a37854007f0a86e9547503494 Mon Sep 17 00:00:00 2001 From: msp5382 Date: Tue, 26 Dec 2023 16:53:46 +0700 Subject: [PATCH] ci: try gh actions --- .github/workflows/ci.yaml | 34 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..c56d2e9 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,34 @@ +name: Continuous Integration +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + ci: + runs-on: ubuntu-latest + timeout-minutes: 40 + concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v3 + name: Checkout + with: + fetch-depth: 0 + + - uses: dtinth/setup-github-actions-caching-for-turbo@v1 + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + with: + version: 8 + + - name: Install dependencies + run: bun install + + - name: Run build + run: bun build:container && bun build:plugin diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..726b2d8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +name: Release with reusable workflows + +on: + push: + branches: + - main + +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: write + discussions: read + packages: write + pull-requests: write + repository-projects: read + security-events: read + statuses: read + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + uses: softnetics/workflows/.github/workflows/release-packages.yaml@main + with: + before-publish: npm build:plugin + package-manager: npm + secrets: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}