Merge pull request #20 from AthenaFoundation/thread_based_tcp_sockets #46
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
name: Release | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
compare_latest_tag_and_current_version: | |
runs-on: ubuntu-20.04 | |
outputs: | |
current_version: ${{ steps.read_current_version.outputs.version}} | |
latest_version: ${{ steps.previous_tag.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v2.2.0 | |
with: | |
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags | |
- name: Get previous tag | |
id: previous_tag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
fallback: 0.0.0 # Optional fallback tag to use when no tag can be found | |
- name: Get current version | |
id: read_current_version | |
run: echo "::set-output name=version::$(cat version.txt)" | |
generate-release: | |
name: Generate release & tag | |
runs-on: ubuntu-20.04 | |
needs: compare_latest_tag_and_current_version | |
if: | | |
(needs.compare_latest_tag_and_current_version.outputs.current_version != | |
needs.compare_latest_tag_and_current_version.outputs.latest_version) | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: version | |
run: echo "::set-output name=version::$(cat version.txt)" | |
shell: bash | |
id: version | |
- name: create-release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: false | |
prerelease: false | |
release_name: Athena ${{ steps.version.outputs.version }} | |
tag_name: ${{ steps.version.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release-linux: | |
name: Release binaries and supporting files (Linux) | |
runs-on: ubuntu-20.04 | |
needs: [generate-release, compare_latest_tag_and_current_version] | |
if: | | |
(needs.compare_latest_tag_and_current_version.outputs.current_version != | |
needs.compare_latest_tag_and_current_version.outputs.latest_version) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pre-requisites | |
run: | | |
sudo apt-get -y update | |
sudo apt-get install -y make mlton minisat spass cvc4 smlnj ml-yacc ml-ulex | |
- name: Build | |
run: | | |
make smlnj packages | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
id: upload-artifact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.generate-release.outputs.upload_url }} | |
asset_path: ./packages/athena-linux-${{ needs.generate-release.outputs.version }}.zip | |
asset_name: athena-linux-${{ needs.generate-release.outputs.version }}.zip | |
asset_content_type: application/zip | |
release-macos: | |
name: Release binaries and supporting files (macos) | |
runs-on: macos-13 | |
needs: [generate-release, compare_latest_tag_and_current_version] | |
if: | | |
(needs.compare_latest_tag_and_current_version.outputs.current_version != | |
needs.compare_latest_tag_and_current_version.outputs.latest_version) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install pre-requisites | |
run: | | |
brew install mlton smlnj | |
- name: Build | |
run: | | |
make packages | |
- name: version | |
run: | | |
echo "::set-output name=version::$(cat version.txt)" | |
id: version | |
- name: Upload artifacts | |
uses: actions/upload-release-asset@v1 | |
id: upload-artifact | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.generate-release.outputs.upload_url }} | |
asset_path: ./packages/athena-darwin-${{ needs.generate-release.outputs.version }}.zip | |
asset_name: athena-darwin-${{ needs.generate-release.outputs.version }}.zip | |
asset_content_type: application/zip |