Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add CLI release workflow

Manav Rathi1b9af538fd35
diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml
new file mode 100644
index 0000000000..85eec2358b
--- /dev/null
+++ b/.github/workflows/cli-release.yml
@@ -0,0 +1,40 @@
+name: "Release (cli)"
+
+on:
+ push:
+ # Run when a tag matching the pattern "cli-v*"" is pushed
+ #
+ # Tip: to test this workflow, push at tag with a pre-release version,
+ # e.g. `cli-v1.2.3-test`, where 1.2.3 is the expected version number of
+ # the next release that'll go out.
+ tags:
+ - "cli-v*"
+
+jobs:
+ goreleaser:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Install latest Syft
+ run: |
+ wget $(curl -s https://api.github.com/repos/anchore/syft/releases/latest | grep 'browser_' | grep 'linux_amd64.rpm' | cut -d\" -f4) -O syft_latest_linux_amd64.rpm
+ sudo rpm -i syft_latest_linux_amd64.rpm
+
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ # Required for the changelog to work correctly.
+ fetch-depth: 0
+
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: "1.20"
+
+ - name: Run GoReleaser
+ uses: goreleaser/goreleaser-action@v5
+ with:
+ workdir: cli
+ args: release --rm-dist
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/cli/.github/workflows/release.yml b/cli/.github/workflows/release.yml
deleted file mode 100644
index e5dca69237..0000000000
--- a/cli/.github/workflows/release.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Release
-
-on:
- # allow manual run
- push:
- tags:
- - 'v*.*.*' # This will run the workflow when you push a new tag in the format v0.0.0
- - 'v*.*.*-beta.*'
-
-jobs:
- goreleaser:
- runs-on: ubuntu-latest
- steps:
- - name: Install latest Syft
- run: |
- wget $(curl -s https://api.github.com/repos/anchore/syft/releases/latest | grep 'browser_' | grep 'linux_amd64.rpm' | cut -d\" -f4) -O syft_latest_linux_amd64.rpm
- sudo rpm -i syft_latest_linux_amd64.rpm
-
- - name: Checkout code
- uses: actions/checkout@v4
- with:
- fetch-depth: 0 # Important to ensure that GoReleaser works correctly
-
- - name: Set up Go
- uses: actions/setup-go@v4
- with:
- go-version: '1.20' # You can adjust the Go version here
-
- - name: Run GoReleaser
- uses: goreleaser/goreleaser-action@v5
- with:
- distribution: goreleaser
- version: latest
- args: release --rm-dist
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the provided GITHUB_TOKEN secret