|
13 | 13 | env: |
14 | 14 | EP_GH_IGNORE_TIME: true |
15 | 15 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 16 | + AWS_ACCESS_KEY_ID: ${{ secrets.FILEBASE_ACCESS_KEY_ID }} |
| 17 | + AWS_SECRET_ACCESS_KEY: ${{ secrets.FILEBASE_SECRET_ACCESS_KEY }} |
16 | 18 | APPLE_CERT_ID: ${{ secrets.APPLE_CERT_ID }} |
17 | 19 | APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} |
18 | 20 | APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} |
@@ -91,52 +93,16 @@ jobs: |
91 | 93 | # package |
92 | 94 | cd $wd |
93 | 95 | yarn run publish --win --linux --mac --x64 --arm64 |
94 | | - - name: publish changelog |
95 | | - uses: actions/github-script@v4 |
| 96 | + - name: upload |
| 97 | + uses: actions/upload-artifact@v3 |
96 | 98 | with: |
97 | | - script: | |
98 | | - // extract the repo and tag |
99 | | - const { repo: githubRepo, ref } = context, |
100 | | - { owner, repo } = githubRepo, |
101 | | - tag = ref.replace('refs/tags/', '').trim(), |
102 | | - { data } = await github.repos.getReleaseByTag({ |
103 | | - owner, repo, tag |
104 | | - }), |
105 | | - { name, id: release_id } = data, |
106 | | - // read the changelog |
107 | | - logLines = require('fs').readFileSync('CHANGELOG.md').toString('utf-8').split('\n'); |
108 | | -
|
109 | | - // find matching release in the changelog |
110 | | - let body = [], found; |
111 | | - for (let i = 0; i < logLines.length; i++) { |
112 | | - const line = logLines[i]; |
113 | | - // if this line matches the target release header, start collecting lines |
114 | | - if (line.indexOf(`# ${name}`) === 0) { |
115 | | - found = true; |
116 | | - continue; |
117 | | - } |
118 | | -
|
119 | | - // if the release hasn't been seen yet, skip |
120 | | - if (!found) |
121 | | - continue; |
122 | | - // if the line matches the next release header, stop |
123 | | - else if (/^# [0-9]+\.[0-9]+\.[0-9]+/.test(line)) { |
124 | | - body = body.join('\n').trim(); |
125 | | - break; |
126 | | - } |
127 | | -
|
128 | | - // otherwise, add the line to the body |
129 | | - body.push(line); |
130 | | - } |
131 | | -
|
132 | | - // if we didn't find the body, throw an error |
133 | | - if (!body.length) |
134 | | - throw new Error(`could not find release body for ${name}`); |
135 | | -
|
136 | | - // update the release |
137 | | - await github.repos.updateRelease({ |
138 | | - owner, repo, body, release_id |
139 | | - }); |
| 99 | + name: host manager ${{ github.ref_name }} |
| 100 | + path: | |
| 101 | + dist/*.AppImage |
| 102 | + dist/*.deb |
| 103 | + dist/*.exe |
| 104 | + dist/*.dmg |
| 105 | + dist/*.sha256 |
140 | 106 | - name: cleanup |
141 | 107 | if: ${{ always() }} |
142 | 108 | run: | |
|
0 commit comments