Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Creates a new bugfix release whenever a push is made to master.

name: release

# Controls when the action will run.
on:
push:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Calculate next version
run: |
git pull
export CURRENT_VERSION=$(cat version.txt)
export THIS_VERSION=$(echo $CURRENT_VERSION | awk -F. -v OFS=. '{$NF++;print}')
echo "THIS_VERSION=$THIS_VERSION" >> $GITHUB_ENV
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not that I'm aware of.
Is there an advantage to using the actions output syntax over the actions env syntax?

Copy link
Member

Choose a reason for hiding this comment

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

No idea! :) Either way looks like it works


- name: Store next version
run: |
echo ${{ env.THIS_VERSION }} > version.txt

git config user.name "GitHub Actions"
git config user.email "actions@users.noreply.github.com"
git commit -am "Automated release - advance the release version."
git push

- name: Cut release
uses: softprops/action-gh-release@91409e712cf565ce9eff10c87a8d1b11b81757ae
with:
tag_name: v${{ env.THIS_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ Full Iris test data.

This repository includes artificially created data.

Pushes to ``master`` branch (i.e. pull request merges) will trigger an
automatic increment of iris-test-data's minor release version (via a GitHub
Action).


.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN

Data found in this repository are licensed under the UK's Open Government Licence:

Documentation, example and data license
---------------------------------------

|copy| British Crown copyright, 2021.
You may use and re-use the information featured in this repository (not including logos) free of
charge in any format or medium, under the terms of the
`Open Government Licence <http://reference.data.gov.uk/id/open-government-licence>`_.

You may use and re-use the information featured in this repository (not including logos) free of
charge in any format or medium, under the terms of the
`Open Government Licence <http://reference.data.gov.uk/id/open-government-licence>`_.
We encourage users to establish hypertext links to this website.
Any email enquiries regarding the use and re-use of this information resource should be

Any email enquiries regarding the use and re-use of this information resource should be
sent to: psi@nationalarchives.gsi.gov.uk.