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

Add release script #736

Merged
merged 3 commits into from Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}"