diff --git a/.github/workflows/Register.yml b/.github/workflows/Register.yml deleted file mode 100644 index 5b7cd3b..0000000 --- a/.github/workflows/Register.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Register Package -on: - workflow_dispatch: - inputs: - version: - description: Version to register or component to bump - required: true -jobs: - register: - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - uses: julia-actions/RegisterAction@latest - with: - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Registrator.yml b/.github/workflows/Registrator.yml new file mode 100644 index 0000000..255e2af --- /dev/null +++ b/.github/workflows/Registrator.yml @@ -0,0 +1,24 @@ +name: Register Package +on: + workflow_dispatch: + pull_request: + types: + - closed + paths: + - 'Project.toml' + branches: + - 'master' + - 'main' + +permissions: + contents: write + pull-requests: write + +jobs: + Register: + if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true + uses: "ITensor/ITensorActions/.github/workflows/Registrator.yml@main" + with: + localregistry: ITensor/ITensorRegistry + secrets: + REGISTRATOR_KEY: ${{ secrets.REGISTRATOR_KEY }}