Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request nichollsh#6 from FormingWorlds/package
Browse files Browse the repository at this point in the history
Make SOCRATES available via github artifacts
  • Loading branch information
stefsmeets authored Aug 1, 2024
2 parents 5458433 + 0144f78 commit 164ec8e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The build workflow compiles the code and makes the zip file in the [Action artifacts](https://github.com/FormingWorlds/SOCRATES/actions). Any push to the master branch will trigger the workflow to compile the code

How to make a release:

1. Tag a version of the code, e.g. `git tag 1.0.0`
2. Push the tag, `git push origin tag 1.0.0`
3. The [action-gh-release action](https://github.com/softprops/action-gh-release) detects a tagged commit and makes a [release](https://github.com/FormingWorlds/SOCRATES/releases)
4. The release contains a zip file with the compiled code
5. Update the release notes if necessary
21 changes: 19 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Compile SOCRATES

on:
push:
branches: [main]
branches:
- main

jobs:
install:
Expand All @@ -16,10 +17,26 @@ jobs:
sudo apt update
sudo apt-get install libnetcdff-dev netcdf-bin gfortran gcc
- name: SOCRATES
- name: Build
run: |
export LD_LIBRARY_PATH=""
./configure
./build_code
source set_rad_env
- name: Zip
run: |
zip -r socrates-${{ runner.os }} .
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: socrates-${{ runner.os }}.zip
path: socrates-${{ runner.os }}.zip

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: socrates-${{ runner.os }}.zip
body_path: version

0 comments on commit 164ec8e

Please sign in to comment.