From ad51dbdf3c5170f067410d2bf51dcaac2045fb7b Mon Sep 17 00:00:00 2001 From: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Date: Tue, 29 Nov 2022 05:41:49 -0600 Subject: [PATCH] Add a workflow to publish package to gitea (#3) --- .github/workflows/publish-gitea.yaml | 32 ++++++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 4 ++-- 3 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish-gitea.yaml diff --git a/.github/workflows/publish-gitea.yaml b/.github/workflows/publish-gitea.yaml new file mode 100644 index 0000000000..51b9c53bbd --- /dev/null +++ b/.github/workflows/publish-gitea.yaml @@ -0,0 +1,32 @@ +name: Publish npm package to gitea +on: + release: + types: [published] +jobs: + npm_publish: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 16.x ] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: yarn + - name: Run yarn build + run: | + yarn build + - name: Configure git.vdb.to npm registry + run: | + npm config set registry https://git.vdb.to/api/packages/cerc-io/npm/ + - name: Authenticate to git.vdb.to registry + run: | + npm config set -- '//git.vdb.to/api/packages/cerc-io/npm/:_authToken' "${{ secrets.GITEA_PUBLISH_TOKEN }}" + - name: npm publish + run: | + npm publish diff --git a/package-lock.json b/package-lock.json index af65687d31..7b2abfb5b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "assemblyscript", - "version": "0.0.0", + "version": "0.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "assemblyscript", - "version": "0.0.0", + "version": "0.0.1", "license": "Apache-2.0", "dependencies": { "asyncify-wasm": "^1.2.1", diff --git a/package.json b/package.json index d631d3a462..a3b189f2d3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@vulcanize/assemblyscript", + "name": "assemblyscript", "description": "Definitely not a TypeScript to WebAssembly compiler.", "keywords": [ "typescript", @@ -131,6 +131,6 @@ "url": "https://opencollective.com/assemblyscript" }, "publishConfig": { - "registry": "https://npm.pkg.github.com" + "registry": "https://git.vdb.to/api/packages/cerc-io/npm/" } }