From c4c3eb9aaa72e0b3d43a507ff507b90239135821 Mon Sep 17 00:00:00 2001 From: dappnodedev Date: Tue, 3 Sep 2024 12:17:53 +0200 Subject: [PATCH] Add workflows --- .github/workflows/auto_check.yml | 20 +++++++++++++++++ .github/workflows/build.yml | 15 +++++++++++++ .github/workflows/main.yml | 38 ++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 .github/workflows/auto_check.yml create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/auto_check.yml b/.github/workflows/auto_check.yml new file mode 100644 index 0000000..ebddc6c --- /dev/null +++ b/.github/workflows/auto_check.yml @@ -0,0 +1,20 @@ +name: Bump upstream version + +on: + schedule: + - cron: "00 */4 * * *" + push: + branches: + - "main" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npx @dappnode/dappnodesdk github-action bump-upstream --use-variants + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} + PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..24afe2a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,15 @@ +name: Build test +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npx @dappnode/dappnodesdk github-action build --variant gnosis + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} + PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..6e253d7 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,38 @@ +name: "Main" +on: + workflow_dispatch: + inputs: + bump: + description: "Bump type, must be: patch" + required: true + repository_dispatch: + pull_request: + push: + branches: + - "main" + - "master" + - "v[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - "README.md" + +jobs: + build-test: + runs-on: ubuntu-latest + name: Build test + if: github.event_name != 'push' + steps: + - name: Checkout + uses: actions/checkout@v4 + - run: npx @dappnode/dappnodesdk build --skip_save --variant gnosis + + release: + name: Release + runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' + steps: + - uses: actions/checkout@v4 + - name: Publish + run: npx @dappnode/dappnodesdk publish patch --dappnode_team_preset --timeout 1h --all-variants + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEVELOPER_ADDRESS: "0xf35960302a07022aba880dffaec2fdd64d5bf1c1"