Skip to content

Commit eb5199b

Browse files
committed
ci(actions): updated actions
1 parent c76b733 commit eb5199b

1 file changed

Lines changed: 5 additions & 75 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,12 @@ on:
66
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
77

88
jobs:
9-
test:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout
13-
uses: actions/checkout@v2
14-
15-
- name: Read .nvmrc
16-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
17-
id: nvm
18-
19-
- name: Setup Node
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
23-
24-
- name: Install
25-
run: |
26-
yarn install
27-
28-
- name: Build
29-
run: yarn release
30-
31-
- name: Artifact
32-
uses: actions/upload-artifact@v2
33-
with:
34-
name: ubuntu-latest
35-
path: dist
36-
37-
389
build:
3910
needs: test
4011
strategy:
4112
fail-fast: true
42-
matrix:
43-
os: [macos-latest, windows-latest, ubuntu-latest]
4413
max-parallel: 3
45-
runs-on: ${{ matrix.os }}
14+
runs-on: ubuntu-latest
4615
steps:
4716
- name: Checkout
4817
uses: actions/checkout@v2
@@ -61,12 +30,10 @@ jobs:
6130
yarn install
6231
6332
- name: Build
64-
if: startsWith(matrix.os, 'macos')
6533
run: |
6634
yarn release
6735
6836
- name: Get Change
69-
if: startsWith(matrix.os, 'ubuntu')
7037
id: changes
7138
run: |
7239
echo "# ${{ github.ref }}" > changes.txt
@@ -86,7 +53,6 @@ jobs:
8653
echo ::set-output name=log::$(cat changes.txt)
8754
8855
- name: Upload change
89-
if: startsWith(matrix.os, 'ubuntu')
9056
uses: actions/upload-artifact@v2
9157
with:
9258
name: changes
@@ -118,14 +84,11 @@ jobs:
11884
id: create_release
11985
uses: actions/create-release@v1
12086
env:
121-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12288
with:
12389
tag_name: ${{ github.ref }}
12490
release_name: Release ${{ github.ref }}
125-
# body: ${{ steps.changes.outputs.log }}
12691
body_path: changes.txt
127-
# body: ${{ needs.build.outputs.log }}
128-
# echo ::set-env name=FOO::$(echo -n "hello world")
12992
draft: false
13093
prerelease: false
13194

@@ -137,11 +100,6 @@ jobs:
137100
upload:
138101
needs: release
139102
runs-on: ubuntu-latest
140-
strategy:
141-
fail-fast: true
142-
matrix:
143-
os: [ubuntu-latest, macos-latest, windows-latest]
144-
max-parallel: 3
145103
steps:
146104
- uses: actions/download-artifact@v2
147105
with:
@@ -153,42 +111,14 @@ jobs:
153111
run: dir ProjectExportAPI
154112

155113
- name: Compress folder
156-
if: startsWith(matrix.os, 'windows')
157-
run: cd ProjectExportAPI && 7za a ../ProjectExportAPI.zip
158-
159-
- name: Compress folder
160-
if: startsWith(matrix.os, 'windows') != true
161-
run: zip -r ProjectExportAPI.zip ProjectExportAPI/*
114+
run: tar -cvzf ProjectExportAPI.tar.gz ProjectExportAPI
162115

163116
- name: Upload Linux Asset
164-
if: startsWith(matrix.os, 'ubuntu')
165-
uses: actions/upload-release-asset@v1
166-
env:
167-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168-
with:
169-
upload_url: ${{ needs.release.outputs.upload_url }}
170-
asset_path: ProjectExportAPI.zip
171-
asset_name: ProjectExportAPI-linux.zip
172-
asset_content_type: application/zip
173-
174-
- name: Upload Mac Asset
175-
if: startsWith(matrix.os, 'macos')
176-
uses: actions/upload-release-asset@v1
177-
env:
178-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179-
with:
180-
upload_url: ${{ needs.release.outputs.upload_url }}
181-
asset_path: ProjectExportAPI.zip
182-
asset_name: ProjectExportAPI-mac.zip
183-
asset_content_type: application/zip
184-
185-
- name: Upload Windows Asset
186-
if: startsWith(matrix.os, 'windows')
187117
uses: actions/upload-release-asset@v1
188118
env:
189119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190120
with:
191121
upload_url: ${{ needs.release.outputs.upload_url }}
192-
asset_path: ProjectExportAPI.zip
193-
asset_name: ProjectExportAPI-windows.zip
122+
asset_path: ProjectExportAPI.tar.gz
123+
asset_name: ProjectExportAPI.tar.gz
194124
asset_content_type: application/zip

0 commit comments

Comments
 (0)