From a70e5aec6b8acbe8943bf04816954f3c752d306d Mon Sep 17 00:00:00 2001 From: Bryce Thorup Date: Thu, 8 Jan 2026 09:11:40 -0700 Subject: [PATCH] init --- .gitea/workflows/push_to_main.yaml | 16 ++++++++++++++++ action.sh | 2 ++ action.yaml | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 .gitea/workflows/push_to_main.yaml create mode 100644 action.sh create mode 100644 action.yaml diff --git a/.gitea/workflows/push_to_main.yaml b/.gitea/workflows/push_to_main.yaml new file mode 100644 index 0000000..d4b219c --- /dev/null +++ b/.gitea/workflows/push_to_main.yaml @@ -0,0 +1,16 @@ +name: Push to main + +on: + push: + branches: [main] + +jobs: + Reset-Version-Tag: + runs-on: debian-bullseye + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: git tag -d v1 || true + - run: git push --delete origin v1 || true + - run: git tag v1 + - run: git push --tags diff --git a/action.sh b/action.sh new file mode 100644 index 0000000..ff38fe9 --- /dev/null +++ b/action.sh @@ -0,0 +1,2 @@ +dart pub token add --env-var=INPUT_PUB_REPO_KEY $INPUT_PUB_REPO_DOMAIN +dart pub publish --skip-validation -f diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..71dc503 --- /dev/null +++ b/action.yaml @@ -0,0 +1,16 @@ +name: pub-publish +description: "publishes latest version tag to a pub repository" +author: "Bryce Thorup" +inputs: + npm_repo_key: + description: Key used for publising to pub repo + required: true + npm_repo_domain: + description: Domain for pub repo + required: true +runs: + using: "composite" + steps: + - uses: dart-lang/setup-dart@v1 + - run: $GITHUB_ACTION_PATH/action.sh + shell: bash