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