Skip to content

Commit

Permalink
Initial commit of CI workflow config.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwl committed Dec 12, 2023
1 parent 6660b81 commit 0ade7d1
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: CI
on:
push:
branches:
- main
- master
tags:
- 'v*'
pull_request:

jobs:
yd-bal:
name: Archive YD-Bal
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: yd_bal
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: zip -Z deflate ieee4-yd_bal.ckt *.csv *.json README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v2
with:
name: ckt-yd-bal
path: ieee4-yd_bal.ckt
dy-bal:
name: Archive DY-Bal
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: dy_bal
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: zip -Z deflate ieee4-dy_bal.ckt *.csv *.json README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v2
with:
name: ckt-dy-bal
path: ieee4-dy_bal.ckt

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
permissions: write-all
needs: [ yd-bal, dy-bal ]
steps:
- uses: actions/download-artifact@v2
with:
name: ckt-yd-bal
- uses: actions/download-artifact@v2
with:
name: ckt-dy-bal

- name: Release
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload YD-Bal artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee4-yd_bal.ckt
asset_name: ieee4-yd_bal
asset_content_type: application/zip

- name: Upload DY-Bal artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee4-dy_bal.ckt
asset_name: ieee4-dy_bal
asset_content_type: application/zip

0 comments on commit 0ade7d1

Please sign in to comment.