Skip to content

Commit

Permalink
Try pushing dist to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed May 13, 2024
1 parent 38d6a14 commit dc36557
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Publish Package

on:
push:
workflow_dispatch:
inputs:
increment:
type: choice
description: Version increment (defaults to minor)
default: minor
options:
- major
- minor
Expand Down Expand Up @@ -41,14 +43,14 @@ jobs:

- name: Setup git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Build
run: pnpm build

- name: Publish package
run: pnpm release --increment ${{ inputs.increment }}
run: pnpm release --increment prepatch
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"release": true,
"autoGenerate": true,
"releaseName": "v${version}"
},
"hooks": {
"after:git:bump": "git add dist -f"
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ In the project where you want to use this package as a dependency, run the follo
```sh
pnpm link --global @pufferfinance/smart-contract-lib
```

## Release

The release is automated using [release-it](https://github.com/release-it/release-it).
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@pufferfinance/smart-contract-lib",
"description": "Library for Puffer smart contract interactions",
"version": "0.0.3-0",
"repository": {
"type": "git",
Expand Down

0 comments on commit dc36557

Please sign in to comment.