Skip to content
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
26 changes: 2 additions & 24 deletions .github/README.md → .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,6 @@ The repository uses **Changesets** for version management with independent relea

All development happens on the `develop` branch with automated testing, changeset validation, and manual release controls by authorized teams.

## How to test github workflows locally

To be able to test github workflows locally you can use act, a github actions simulator [act homepage](https://nektosact.com/introduction.html)

### Install act

```bash
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
```

### Run workflow

Substitute \<workflow\> for the workflow you want to test (ats.pubilsh, mp.release, ...)

```bash
./bin/act workflow_dispatch \
-W .github/workflows/<workflow>.yml \
--input dry-run-enabled=true \
-s NPM_TOKEN=fake_token \
-P token-studio-linux-large=catthehacker/ubuntu:act-latest
```

## Developer Workflow

### Daily Development Process
Expand Down Expand Up @@ -340,13 +318,13 @@ sequenceDiagram

```bash
# Development
npm run changeset # Create changeset
npm run changeset # Create changeset
npm run changeset:status # Check pending changes
npm run ats:test # Run ATS tests
npm run mass-payout:test # Run MP tests

# Preview releases
npm run release:preview # Show all pending releases
npm run release:preview # Show all pending releases
npm run release:ats # Preview ATS release (local)
npm run release:mp # Preview MP release (local)
```
14 changes: 7 additions & 7 deletions .github/workflows/ats.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
dry-run-enabled:
description: 'Run npm publish with dry-run flag'
description: "Run npm publish with dry-run flag"
required: false
type: boolean
default: false
Expand All @@ -27,8 +27,8 @@ jobs:
contracts:
name: Publish ATS Contracts
runs-on: token-studio-linux-large
# Only run if manual trigger OR release tag contains '-ats-'/'-ATS-'
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref_name, '-ats-') || contains(github.ref_name, '-ATS-') }}
# Only run if manual trigger OR release tag contains/ends with '-ats'/'-ATS'
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref_name, '-ats-') || endsWith(github.ref_name, '-ats') }}

steps:
- name: Harden Runner
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
DRY_RUN: ${{ inputs.dry-run-enabled }}
working-directory: packages/ats/contracts
run: |
PUBLISH_ARGS=("--access=restricted")
PUBLISH_ARGS=("--access=public")
if [[ "${DRY_RUN}" == "true" ]]; then
PUBLISH_ARGS+=("--dry-run")
echo "🔍 DRY RUN MODE: Would publish @hashgraph/asset-tokenization-contracts"
Expand All @@ -82,8 +82,8 @@ jobs:
sdk:
name: Publish ATS SDK
runs-on: token-studio-linux-large
# Only run if manual trigger OR release tag contains '-ats-'/'-ATS-'
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref_name, '-ats-') || contains(github.ref_name, '-ATS-') }}
# Only run if manual trigger OR release tag contains/ends with '-ats'/'-ATS'
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.ref_name, '-ats-') || endsWith(github.ref_name, '-ats') }}
# needs: contracts # Commented out for parallel execution

steps:
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
DRY_RUN: ${{ inputs.dry-run-enabled }}
working-directory: packages/ats/sdk
run: |
PUBLISH_ARGS=("--access=restricted")
PUBLISH_ARGS=("--access=public")
if [[ "${DRY_RUN}" == "true" ]]; then
PUBLISH_ARGS+=("--dry-run")
echo "🔍 DRY RUN MODE: Would publish @hashgraph/asset-tokenization-sdk"
Expand Down