Skip to content

Commit 0d46a49

Browse files
committed
ci:rename rust.yml to build.yml && misc
1 parent 8988170 commit 0d46a49

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

.github/workflows/rust.yml renamed to .github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust
1+
name: Build
22

33
on:
44
push:
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Build
2020
run: cargo build --verbose
2121
- name: Run tests

.github/workflows/release.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Build and Release Binaries
22

33
on:
4-
release:
5-
types: [created]
4+
push:
5+
tags:
6+
- 'v*.*.*'
67

78
jobs:
89
build:
@@ -58,26 +59,28 @@ jobs:
5859

5960
- name: rename and zip artifacts
6061
run: |
61-
mv artifacts/aw-watcher-lastfm-linux aw-watcher-lastfm
62-
zip -r aw-watcher-lastfm-linux.zip aw-watcher-lastfm
63-
rm -rf aw-watcher-lastfm
64-
mv artifacts/aw-watcher-lastfm-macos aw-watcher-lastfm
65-
zip -r aw-watcher-lastfm-macos.zip aw-watcher-lastfm
66-
rm -rf aw-watcher-lastfm
67-
mv artifacts/aw-watcher-lastfm-windows.exe aw-watcher-lastfm.exe
68-
zip -r aw-watcher-lastfm-windows.zip aw-watcher-lastfm.exe
69-
rm -rf aw-watcher-lastfm.exe
70-
62+
cd artifacts
63+
for file in */*; do
64+
if [[ $file == *"windows"* ]]; then
65+
mv "$file" aw-watcher-lastfm.exe
66+
zip "${file%/*}-windows.zip" aw-watcher-lastfm.exe
67+
rm aw-watcher-lastfm.exe
68+
else
69+
mv "$file" aw-watcher-lastfm
70+
zip "${file%/*}.zip" aw-watcher-lastfm
71+
rm aw-watcher-lastfm
72+
fi
73+
done
7174
- name: Create Release
7275
uses: softprops/action-gh-release@v2
7376
env:
7477
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7578
with:
7679
tag_name: ${{ github.ref_name }}
7780
name: Release ${{ github.ref_name }}
78-
draft: false
81+
draft: true
7982
prerelease: false
8083
files: |
81-
artifacts/aw-watcher-lastfm-linux/aw-watcher-lastfm-linux
82-
artifacts/aw-watcher-lastfm-macos/aw-watcher-lastfm-macos
83-
artifacts/aw-watcher-lastfm-windows.exe/aw-watcher-lastfm-windows.exe
84+
aw-watcher-lastfm-linux.zip
85+
aw-watcher-lastfm-macos.zip
86+
aw-watcher-lastfm-windows.zip

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Activitywatch watcher for last.fm
2-
[![Build](https://github.com/brayo-pip/aw-watcher-lastfm/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/brayo-pip/aw-watcher-lastfm/actions/workflows/rust.yml) [![dependency status](https://deps.rs/repo/github/0xbrayo/aw-watcher-lastfm/status.svg)](https://deps.rs/repo/github/0xbrayo/aw-watcher-lastfm)
2+
[![Build](https://github.com/brayo-pip/aw-watcher-lastfm/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/brayo-pip/aw-watcher-lastfm/actions/workflows/rust.yml) [![dependency status](https://deps.rs/repo/github/0xbrayo/aw-watcher-lastfm/status.svg)](https://deps.rs/repo/github/0xbrayo/aw-watcher-lastfm)
33

44
This is a simple activitywatch watcher for last.fm scrobble data. It uses the last.fm API to fetch scrobbles and sends them to the activitywatch server.
55

0 commit comments

Comments
 (0)