fix metadata #98
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: CI | |
on: | |
push: | |
branches: | |
- release-0.3 | |
pull_request: | |
branches: | |
- release-0.3 | |
jobs: | |
set_env_vars: | |
runs-on: ubuntu-latest | |
outputs: | |
ligo_container: ${{ steps.save_var.outputs.ligo_container }} | |
release_version: ${{ steps.version.outputs.value }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Set LIGO version | |
id: save_var | |
run: echo "ligo_container=ligolang/ligo:"`make -s ligo-version` >> $GITHUB_OUTPUT | |
- name: Set release version | |
uses: sergeysova/jq-action@v2 | |
id: version | |
with: | |
cmd: 'jq .version package.json -r' | |
build: | |
needs: set_env_vars | |
runs-on: ubuntu-latest | |
container: ${{ needs.set_env_vars.outputs.ligo_container }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Install ligo dependencies | |
run: /root/ligo install | |
- name: Build | |
run: LIGO=/root/ligo BUILD_VERSION=${{ needs.set_env_vars.outputs.release_version }} make build | |
- name: Test | |
run: LIGO=/root/ligo make test | |
- name: Package | |
run: make tarball-app | |
- name: release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: true | |
prerelease: true | |
release_name: ${{ needs.set_env_vars.outputs.release_version }} | |
tag_name: ${{ needs.set_env_vars.outputs.release_version }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Upload metadata | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./_build/app/metadata.json | |
asset_name: metadata.json | |
asset_content_type: application/json | |
- name: Upload contract | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./_build/app/tzsafe.tez | |
asset_name: tzsafe.tez | |
asset_content_type: application/text | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: app | |
path: _build/*.tar.gz |