Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jul 31, 2024
1 parent a4ef957 commit 0813857
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: screenpipe-linux

- name: Download macOS Artifact Intel
uses: actions/download-artifact@v2
with:
Expand All @@ -231,27 +226,24 @@ jobs:
with:
name: screenpipe-macos-aarch64-apple-darwin

- name: Download Windows Artifact
uses: actions/download-artifact@v2
with:
name: screenpipe-windows

- name: Set Version
shell: bash
# get the current tag or take latest (in the case of a workflow dispatch)
- name: Set version
run: |
if [[ $GITHUB_REF_NAME != v* ]]; then
VERSION=$(git describe --tags --abbrev=0)
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
else
VERSION=$(git ls-remote --tags --refs --sort="version:refname" | tail -n1 | sed 's/.*\///' | sed 's/^v//')
fi
if [[ -z "$VERSION" ]]; then
VERSION="0.0.0"
fi
VERSION=${VERSION#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(echo ${VERSION} | cut -f1 -d-)" >> $GITHUB_ENV
echo "Set version to: $VERSION"
- name: Create or update Release
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-linux.tar.gz
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-macos-x86_64-apple-darwin
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-macos-aarch64-apple-darwin
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-windows.zip
gh release create ${{ env.VERSION }} --title ${{ env.VERSION }} --generate-notes
gh release upload ${{ env.VERSION }} screenpipe-macos-x86_64-apple-darwin
gh release upload ${{ env.VERSION }} screenpipe-macos-aarch64-apple-darwin

0 comments on commit 0813857

Please sign in to comment.