From 05afb557f9b09230c4dbc02fcaf4c0c2436693cf Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 21 Jun 2024 17:57:55 +0100 Subject: [PATCH 1/2] Add forgejo workflows --- .forgejo/workflows/publish.yml | 36 ++++++++++++++++++++++++++++++++++ .forgejo/workflows/test.yml | 26 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .forgejo/workflows/publish.yml create mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..688a0e1 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,36 @@ +name: Publish to NPM + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test + - run: yarn lint + + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: yarn install --frozen-lockfile + - run: yarn build + - uses: https://github.com/JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..6d80f2c --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,26 @@ +name: Test + +on: + push: + branches: + - feature/* + - hotfix/* + - renovate/* + - dependabot/* + - develop + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: yarn install --frozen-lockfile + - run: yarn build + - run: yarn test + - run: yarn lint \ No newline at end of file -- 2.45.2 From 6238f7024b857cc2776a17ef8dde56fad16099c5 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 21 Jun 2024 18:01:08 +0100 Subject: [PATCH 2/2] Update runs on --- .forgejo/workflows/publish.yml | 4 ++-- .forgejo/workflows/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml index 688a0e1..0289985 100644 --- a/.forgejo/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -8,7 +8,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: node steps: - uses: actions/checkout@v4 @@ -23,7 +23,7 @@ jobs: publish: needs: build - runs-on: ubuntu-latest + runs-on: node steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 6d80f2c..6c856d9 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: node steps: - uses: actions/checkout@v4 -- 2.45.2