v1.1.3 (#95) #16
Workflow file for this run
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: | |
tags: | |
- '*' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Get the Ref | |
id: get-ref | |
uses: ankitvgupta/ref-to-tag-action@master | |
with: | |
ref: ${{ github.ref }} | |
head_ref: ${{ github.head_ref }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Login to Docker registry | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_REGISTRY_USER }} | |
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | |
- name: Build and load image | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
load: true # We can't load and push at the same time... | |
tags: | | |
dicegroup/tentris_server:current_build | |
dicegroup/tentris_server:${{ steps.get-ref.outputs.tag }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache | |
- name: Push image | |
run: | | |
docker push dicegroup/tentris_server:${{ steps.get-ref.outputs.tag }} | |
- name: Extract binaries | |
run: | | |
container_id=$(docker create dicegroup/tentris_server:current_build) | |
docker cp ${container_id}:/tentris_server ./tentris_server | |
docker cp ${container_id}:/tentris_terminal ./tentris_terminal | |
docker cp ${container_id}:/rdf2ids ./rdf2ids | |
docker cp ${container_id}:/ids2hypertrie ./ids2hypertrie | |
zip benchmarktools_clang11_libstdcxx10.zip rdf2ids ids2hypertrie | |
zip tentris_clang11_libstdcxx10.zip tentris_server tentris_terminal | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get-ref.outputs.tag }} | |
release_name: ${{ steps.get-ref.outputs.tag }} | |
draft: true | |
prerelease: false | |
- name: Upload tentris | |
id: upload-tentris-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: tentris_clang11_libstdcxx10.zip | |
asset_name: tentris_${{ steps.get-ref.outputs.tag }}_clang11_libstdcxx10.zip | |
asset_content_type: application/zip | |
- name: Upload benchmarktools | |
id: upload-benchmarktools-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: benchmarktools_clang11_libstdcxx10.zip | |
asset_name: benchmarktools_${{ steps.get-ref.outputs.tag }}_clang11_libstdcxx10.zip | |
asset_content_type: application/zip |