Weekly Release Check #241
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Weekly Release Check | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 14 * * 1" | |
jobs: | |
updater: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version-file: "go.mod" | |
- name: Run | |
run: make run | |
env: | |
GITHUB_TOKEN: ${{ secrets.AUTOUPDATER_TOKEN }} | |
- name: Print outputs | |
id: version-update | |
run: | | |
VERSION=`cat .deployed-version` | |
echo "deployed_version=$VERSION" >> $GITHUB_ENV | |
- name: Print outputs | |
id: version-update-success | |
run: | | |
VERSION=`cat .hugo-version` | |
echo "hugo_version=$VERSION" >> $GITHUB_ENV | |
- name: Test outputs | |
run: | | |
echo "Version ${{env.deployed_version}} / ${{ env.hugo_version }}" | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_TITLE: "Weekly Release Check" | |
SLACK_MESSAGE: "Version ${{env.deployed_version}} / ${{ env.hugo_version }} :rocket:" | |
- name: "Update changelog" | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
echo "- [`date +"%Y-%m-%d"`] Version ${{env.deployed_version}} / ${{ env.hugo_version }}" >> CHANGELOG.md | |
git add . | |
git commit -am "Update changelog" | |
git push |