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

ci: more workflows to automate post-release tasks #780

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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: 20 additions & 0 deletions .github/workflows/aur.yml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've since added a workflow to aur-activitywatch-bin instead, which should probably be preferred: https://github.com/ActivityWatch/aur-activitywatch-bin/blob/master/.github/workflows/autoupdate.yml

(although might want to trigger that workflow from here, for faster updating)

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Update AUR package
on:
release:
types: [released]
Copy link
Member Author

@ErikBjare ErikBjare Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be published, not released.

Edit: maybe not, since released excludes pre-releases (which we want): https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release


jobs:
update:
runs-on: ubuntu-latest
if: '!github.event.release.prerelease'
steps:
- run: |
git clone git@github.com:ActivityWatch/aur-activitywatch-bin.git
cd aur-activitywatch-bin
# set pkgver, reset pkgrel in PKGBUILD
sed -E -i 's/pkgver=.+$/pkgver=\'{{ github.event.release.tag_name }}\'/' PKGBUILD
sed -E -i 's/pkgrel=.+$/pkgrel=1/' PKGBUILD
make
git add PKGBUILD .SRCINFO
git commit -m "updated to {{ github.event.release.tag_name }}"
git push
31 changes: 31 additions & 0 deletions .github/workflows/tweet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tweet
on:
release:
types: [published]

jobs:
tweet-new-release:
name: New release
runs-on: ubuntu-latest
if: github.event.type == "ReleaseEvent" && !github.event.release.prerelease
steps:
- uses: ethomson/send-tweet-action@v1
with:
status: "🚢 New version! ActivityWatch v{{ github.event.release.tag_name }} was just released! 🎉
📦 Check out the release description for more info: {{ github.event.release.html_url }}"
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

# Would be cool to tweet at new contributors when they are detected (by the build_changelog.py script, probably)
#tweet-new-contributor:
# runs-on: ubuntu-latest
# steps:
# - uses: ethomson/send-tweet-action@v1
# with:
# status: "Hi, this is a test!"
# consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
# consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
# access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
# access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
1 change: 1 addition & 0 deletions .github/workflows/winget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Publish to WinGet
on:
release:
types: [released]

jobs:
publish:
runs-on: windows-latest # action can only be run on windows
Expand Down