Skip to content

Commit

Permalink
chore: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdev3 committed Dec 14, 2023
1 parent 6e3b73d commit 51da5e3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Squid Types Release

on:
push:
branches:
- main

jobs:
release:
name: Release Squid Types package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: |
yarn install
yarn build
- name: Setup git profile
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Publish to NPM
id: publish
uses: JS-DevTools/npm-publish@v2
if: ${{ github.event.inputs.npm-release == 'true' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: "./package.json"
dry-run: ${{ github.event.inputs.dry-run }}

- if: ${{ github.event.inputs.npm-release == 'true' && steps.publish.outputs.type != 'none' && github.event.inputs.dry-run == 'false'}}
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsquid/squid-types",
"version": "0.1.",
"version": "0.1.43",
"description": "JS and TS types relating to 0xsquid related projects.",
"main": "dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit 51da5e3

Please sign in to comment.