-
Notifications
You must be signed in to change notification settings - Fork 0
183 lines (175 loc) · 5.15 KB
/
ci.yml
File metadata and controls
183 lines (175 loc) · 5.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: CI
on:
push:
branches:
- main
- master
tags:
- 'v*'
pull_request:
jobs:
base:
name: Archive Base Case
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: tar -cvf ieee30.case *.csv README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: case
path: ieee30.case
dcpf:
name: Archive DCPF
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: dcpf
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: tar -cvf ieee30-dcpf.case *.csv README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: case-dcpf
path: ieee30-dcpf.case
acpf:
name: Archive ACPF
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: acpf
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: tar -cvf ieee30-acpf.case *.csv README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: case-acpf
path: ieee30-acpf.case
dcopf:
name: Archive DCOPF
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: dcopf
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: tar -cvf ieee30-dcopf.case *.csv README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: case-dcopf
path: ieee30-dcopf.case
acopf:
name: Archive ACOPF
runs-on: ubuntu-latest
env:
REPO_NAME: ${{ github.event.repository.name }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: acopf
token: ${{ secrets.GITHUB_TOKEN }}
- name: Archive
run: tar -cvf ieee30-acopf.case *.csv README LICENSE
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: case-acopf
path: ieee30-acopf.case
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
permissions: write-all
needs: [ base, dcpf ]
steps:
- uses: actions/download-artifact@v4
with:
name: case
- uses: actions/download-artifact@v4
with:
name: case-dcpf
- uses: actions/download-artifact@v4
with:
name: case-acpf
- uses: actions/download-artifact@v4
with:
name: case-dcopf
- uses: actions/download-artifact@v4
with:
name: case-acopf
- 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 base artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee30.case
asset_name: ieee30-${{ github.ref_name }}.case
asset_content_type: application/x-tar
- name: Upload dcpf artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee30-dcpf.case
asset_name: ieee30-dcpf-${{ github.ref_name }}.case
asset_content_type: application/x-tar
- name: Upload acpf artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee30-acpf.case
asset_name: ieee30-acpf-${{ github.ref_name }}.case
asset_content_type: application/x-tar
- name: Upload dcopf artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee30-dcopf.case
asset_name: ieee30-dcopf-${{ github.ref_name }}.case
asset_content_type: application/x-tar
- name: Upload acopf artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ieee30-acopf.case
asset_name: ieee30-acopf-${{ github.ref_name }}.case
asset_content_type: application/x-tar