From a3a670e905d9ef3fcb8597427c0e580b381d1825 Mon Sep 17 00:00:00 2001 From: James Brumond Date: Wed, 16 Aug 2023 19:24:30 -0700 Subject: [PATCH] attempting npm publish --- .gitea/workflows/build-and-pubilsh.yaml | 35 +++++++++++++++++++++++ .gitea/workflows/build-and-test.yaml | 38 +++++++++++++++++++++++++ .gitea/workflows/build.yaml | 26 ----------------- 3 files changed, 73 insertions(+), 26 deletions(-) create mode 100644 .gitea/workflows/build-and-pubilsh.yaml create mode 100644 .gitea/workflows/build-and-test.yaml delete mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build-and-pubilsh.yaml b/.gitea/workflows/build-and-pubilsh.yaml new file mode 100644 index 0000000..afe8e98 --- /dev/null +++ b/.gitea/workflows/build-and-pubilsh.yaml @@ -0,0 +1,35 @@ + +name: Build and publish + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Use Node.js 20 + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: npm ci + + - name: Compile TypeScript + run: npm run tsc + + - name: Login to package registry + run: | + npm config set @doc-utils:registry https://gitea.jbrumond.me/api/packages/doc-utils/npm/ + npm config set -- '//gitea.jbrumond.me/api/packages/doc-utils/npm/:_authToken' "${{ secrets.NPM_TOKEN }}" + + - name: Publish package + run: npm publish diff --git a/.gitea/workflows/build-and-test.yaml b/.gitea/workflows/build-and-test.yaml new file mode 100644 index 0000000..10d3a7d --- /dev/null +++ b/.gitea/workflows/build-and-test.yaml @@ -0,0 +1,38 @@ + +name: Build and test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x, 20.x] + + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm ci + + - name: Compile TypeScript + run: npm run tsc + + # todo: tests + - name: Run tests + run: exit 0 diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index b3a9db2..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,26 +0,0 @@ - -name: Build package - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x, 16.x, 18.x, 20.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run tsc