diff --git a/.github/README.md b/.github/workflows/README.md similarity index 92% rename from .github/README.md rename to .github/workflows/README.md index c196a2e9a..8e83b3cda 100644 --- a/.github/README.md +++ b/.github/workflows/README.md @@ -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 \ for the workflow you want to test (ats.pubilsh, mp.release, ...) - -```bash -./bin/act workflow_dispatch \ - -W .github/workflows/.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 @@ -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) ``` diff --git a/.github/workflows/ats.publish.yml b/.github/workflows/ats.publish.yml index faf929855..8fb3225d5 100644 --- a/.github/workflows/ats.publish.yml +++ b/.github/workflows/ats.publish.yml @@ -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 @@ -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 @@ -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" @@ -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: @@ -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"