-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
# Apply a tag to HEAD at the beginning of each week. | ||
# We can use this to create semver-looking tags for releases like | ||
# 2020.44.123+abc1234 | ||
# See https://blog.aspect.build/versioning-releases-from-a-monorepo | ||
on: | ||
schedule: | ||
# Mondays at 5am UTC / midnight EST | ||
- cron: '0 5 * * 1' | ||
|
||
schedule: | ||
# Mondays at 5am UTC / midnight EST | ||
- cron: '0 5 * * 1' | ||
jobs: | ||
tagger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: tag HEAD with [year].[week number] | ||
run: | | ||
curl --request POST \ | ||
--url https://api.github.com/repos/{{ "${{ github.repository }}" }}/git/refs \ | ||
--header 'authorization: Bearer {{ "${{ secrets.GITHUB_TOKEN }}" }}' \ | ||
--data @- << EOF | ||
{ | ||
"ref": "refs/tags/$(date +%Y.%V)", | ||
"sha": "{{ "${{ github.sha }}" }}" | ||
} | ||
EOF | ||
- name: tag HEAD with date +%Y.%V | ||
run: | | ||
curl --request POST \ | ||
--url https://api.github.com/repos/${{ github.repository }}/git/refs \ | ||
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ | ||
--data @- << EOF | ||
{ | ||
"ref": "refs/tags/$(date +%Y.%V)", | ||
"sha": "${{ github.sha }}" | ||
} | ||
EOF |