Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol-tag-utils): implement ANS-115 association utils #1059 #1062

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions .github/workflows/protocol-tag-utils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: 🔖🛠 Test & Deploy Protocol Tag Utils

on:
pull_request:
branches:
- main
paths:
- "protocol-tag-utils/**"
push:
branches:
- main
paths:
- "protocol-tag-utils/**"

# Perform a release using a workflow dispatch
workflow_dispatch:
inputs:
version:
description: "semver version to bump to"
required: true

defaults:
run:
shell: bash

jobs:

test:
if: github.event_name != 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: 📥 Download deps
working-directory: protocol-tag-utils
run: |
npm i

- name: ⚡ Run Tests
working-directory: protocol-tag-utils
run: |
npm test
env:
CI: true

release:
# Releases are performed via a workflow dispatch
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
concurrency:
group: release
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"

- name: 👀 Env
run: |
echo "Event name: ${{ github.event_name }}"
echo "Git ref: ${{ github.ref }}"
echo "GH actor: ${{ github.actor }}"
echo "SHA: ${{ github.sha }}"
VER=`node --version`; echo "Node ver: $VER"
VER=`npm --version`; echo "npm ver: $VER"

- name: 🤓 Set Git User
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"

- name: ✊ Bump
id: bump
uses: hyper63/[email protected]
with:
bump-to: ${{ github.event.inputs.version }}
package: protocol-tag-utils

- name: ⬆️ Push
run: |
git push
git push --tags

- name: 📥 Download deps
working-directory: protocol-tag-utils
run: |
npm i

- name: 🦠 Publish to NPM
working-directory: protocol-tag-utils
run: |
npm run build
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading