Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic releases #1

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,38 @@ 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

publish:
if: github.event_name == 'push'
name: Publish the artifacts
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.