From af7309fffdc22493e42ac71d77b79da0b0ca2a41 Mon Sep 17 00:00:00 2001 From: Mark Kasaboski Date: Fri, 15 Nov 2024 14:39:12 -0500 Subject: [PATCH] Fixes (fingers crossed) publish workflow --- .github/workflows/publish.yml | 15 +++++++++++---- Makefile | 5 +++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 406c5d0..c5d8eb4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,12 +8,19 @@ jobs: publish: runs-on: ubuntu-latest steps: - - name: Download Build Artifact - uses: actions/download-artifact@v4 + - name: Checkout codebase + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: - name: splunk-app + python-version: '3.9' + + - name: Install Application Dependencies + run: | + make build - name: Package and Publish run: | make package - make publish \ No newline at end of file + SPLUNKBASE_CREDS="${{ secrets.SPLUNKBASE_CREDS }}" make publish diff --git a/Makefile b/Makefile index a529964..af41741 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ build: $(MAKE) venv $(MAKE) setup-web +.PHONY: setup-web setup-web: venv yarn.lock yarn run setup @@ -49,8 +50,8 @@ package: packages/flare/bin/vendor "flare" .PHONY: publish -publish: packages/flare.tar.gz - curl -u --request POST https://splunkbase.splunk.com/api/v1/app/7602/new_release/ -F "files[]=@./flare.tar.gz" -F "filename=flare.tar.gz" -F "splunk_versions=9.3" -F "visibility=true" +publish: flare.tar.gz + curl -u "$(SPLUNKBASE_CREDS)" --request POST https://splunkbase.splunk.com/api/v1/app/7602/new_release/ -F "files[]=@./flare.tar.gz" -F "filename=flare.tar.gz" -F "splunk_versions=9.3" -F "visibility=true" .PHONY: validate validate: venv-tools