From 9e212f5cbaa057cd828e2c315236b09dcdfb576d Mon Sep 17 00:00:00 2001 From: Abe Winter Date: Mon, 24 Jun 2024 23:34:30 -0400 Subject: [PATCH 1/3] lint and build --- .github/workflows/build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..98ce7b9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +on: + push: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + - name: lint + run: make lint + - name: build + run: PATH_VERSION=latest make all + - name: upload + if: false + run: echo todo upload From c61ed661265440d4987d7600c762c2e0894ea7ea Mon Sep 17 00:00:00 2001 From: Abe Winter Date: Mon, 24 Jun 2024 23:48:40 -0400 Subject: [PATCH 2/3] use real upload, add inputs --- .github/workflows/build.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98ce7b9..511373c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,11 @@ on: - push: workflow_dispatch: + inputs: + channel: + type: choice + options: [latest, stable, rc] + upload: + type: boolean jobs: build: @@ -12,6 +17,15 @@ jobs: run: make lint - name: build run: PATH_VERSION=latest make all - - name: upload - if: false - run: echo todo upload + - uses: google-github-actions/auth@v2 + if: inputs.upload + with: + credentials_json: '${{ secrets.GCP_CREDENTIALS }}' + - name: Upload Files (PR) + if: inputs.upload + uses: google-github-actions/upload-cloud-storage@v2 + with: + path: bin + destination: packages.viam.com/apps/viam-agent/ + glob: 'viam-agent-*' + parent: false From 173f618c030d657d567974577b021ddadb01bac0 Mon Sep 17 00:00:00 2001 From: Abe Winter Date: Tue, 25 Jun 2024 12:49:05 -0400 Subject: [PATCH 3/3] stable only for now --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 511373c..940d123 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ on: inputs: channel: type: choice - options: [latest, stable, rc] + options: [stable] upload: type: boolean @@ -16,7 +16,7 @@ jobs: - name: lint run: make lint - name: build - run: PATH_VERSION=latest make all + run: PATH_VERSION=${{ inputs.channel }} make all - uses: google-github-actions/auth@v2 if: inputs.upload with: