Add workflow to create pre-releases (#463) #19
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: | |
- "v*" | |
- "!v*-(alpha|beta|rc).*" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: npm i -g @apidevtools/swagger-cli@4 | |
- name: Bundle yaml spec | |
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml" | |
- name: Bundle json spec | |
run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t json -o ./deploy/beacon-node-oapi.json" | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
name: ${{ github.ref_name }} | |
tag_name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
files: | | |
./deploy/beacon-node-oapi.yaml | |
./deploy/beacon-node-oapi.json | |
fail_on_unmatched_files: true | |
- name: Rollback Release | |
if: failure() | |
uses: author/[email protected] | |
with: | |
release_id: ${{ steps.create_release.outputs.id }} | |
tag: ${{ github.ref }} | |
delete_orphan_tag: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |