Skip to content

Commit

Permalink
test release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-thoene committed Nov 20, 2024
1 parent f2b0842 commit a3b201b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,40 @@ jobs:
with:
useConfigFile: true
configFilePath: GitVersion.yml
- name: Store version
run: |
mkdir dist
echo "$GitVersion_FullSemVer" > ./dist/version.txt
- name: Build Linux release
run: |
echo $GitVersion_FullSemVer
cargo set-version $GitVersion_FullSemVer
cargo build --locked --release --bin ${{ env.BINARY_NAME }} --target=${{ env.LINUX_TARGET_x86_64 }}
- name: Create artifact
run: |
mkdir dist
tar -C ./target/${{ env.LINUX_TARGET_x86_64 }}/release -zcvf ./dist/${{ env.LINUX_TARGET_x86_64 }}.tar.gz ./${{ env.BINARY_NAME }}
- name: Publish artifact
# if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: dist
path: |
version.txt
dist
publish:
if: github.event_name == 'push'
name: Publish the artifacts
# if: github.event_name == 'push'
name: Create release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: dist
- name: Load version
run: echo "VERSION=$(cat ./dist/version.txt)" >> $GITHUB_ENV
- name: Publish GitHub release
run: echo "TODO"
run: gh release create --repo $GITHUB_REPOSITORY --draft --title "New release" --notes "This is a new automatically generated release" ${{ env.VERSION }} ./dist/*.tar.gz
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ Because this tool listens on global keystrokes, the user running this applicatio

## Installation

### Build from source

You can install this cli application from this **git repository** using **cargo**

```shell
cargo install --git https://github.com/robin-thoene/hotsave
```

### Prebuilt

To get a prebuilt binary check out the [release page](https://github.com/robin-thoene/hotsave/releases) and download it there.

0 comments on commit a3b201b

Please sign in to comment.