Skip to content

Commit

Permalink
Add release script (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
f-f committed Oct 20, 2020
1 parent d4e0b81 commit 7cdcbab
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/release.yml
Expand Up @@ -34,15 +34,3 @@ jobs:
asset_path: ./packages.dhall
asset_name: packages.dhall
asset_content_type: application/x-dhall
# Now checkout master in order to update the latest-compatible-sets.json file
- uses: actions/checkout@v2
with:
ref: 'master'
- name: Update latest-compatible-sets.json
run: |
nix-shell --run './update-latest-compatible-sets.sh ${{ github.ref }}'
- name: Commit changes to latest-compatible-sets.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update latest-compatible-sets.json for ${{ github.ref }}
file_pattern: latest-compatible-sets.json
24 changes: 24 additions & 0 deletions release.sh
@@ -0,0 +1,24 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash

set -euxo pipefail

# Please use this script to cut new releases. It will generate a new tag name
# based on the current date, update the latest releases file, and push the tag

# TODO: fail if there's a tag with this same name, as sometimes we publish more than one per day

LATEST_PURS="0.13.8"
NEW_TAG="psc-${LATEST_PURS}-`date +'%Y%m%d'`"

./update-latest-compatible-sets.sh "${NEW_TAG}"

git add latest-compatible-sets.json

git commit -m "Update to the latest tag"

git push

git tag "${NEW_TAG}"

git push origin "${NEW_TAG}"

0 comments on commit 7cdcbab

Please sign in to comment.