Skip to content

Reuse workflows in release.yml #57

Reuse workflows in release.yml

Reuse workflows in release.yml #57

Workflow file for this run

name: Release
on:
push:
tags:
- v[0-9]+.*
permissions:
contents: write
jobs:
check:
uses: ./.github/workflows/_check-release.yml
release:
uses: ./.github/workflows/_build-release.yml
with:
scarb-tag: ${{ github.ref_name }}
draft:
name: draft release
runs-on: ubuntu-latest
needs: [ check, release ]
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts-dl
- name: Unpack artifacts to staging directory
run: |
mkdir -p artifacts
mv artifacts-dl/build-*/scarb-* artifacts/
mv artifacts-dl/checksums/* artifacts/
ls -lh artifacts/
- name: Draft GitHub release
id: draft-release
uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: $version
draft: true
- name: Upload artifacts to the release
working-directory: artifacts
run: gh release upload "$TAG" *
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ steps.draft-release.outputs.computed-prefix }}${{ steps.draft-release.outputs.version }}