diff options
author | Aleksey Kladov <[email protected]> | 2020-03-04 16:18:37 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-03-04 16:18:37 +0000 |
commit | 86ec5b391732679770c8706f9d336e1f0d34bf02 (patch) | |
tree | 08ce28b3d0e6352a6bf600b968e6ccac03df6893 /.github/workflows | |
parent | 56f0f15805813b91a7a0778163d977a71adc4d00 (diff) |
Nightly binary releases
This doesn't publish nightly plugin to the marketplace yet
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/release.yaml | 59 |
1 files changed, 12 insertions, 47 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index fe893e005..30f1ff22f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml | |||
@@ -1,5 +1,8 @@ | |||
1 | name: release | 1 | name: release |
2 | on: | 2 | on: |
3 | schedule: | ||
4 | - cron: '0 0 * * *' # midnight UTC | ||
5 | |||
3 | push: | 6 | push: |
4 | branches: | 7 | branches: |
5 | - release | 8 | - release |
@@ -113,6 +116,9 @@ jobs: | |||
113 | node-version: 12.x | 116 | node-version: 12.x |
114 | 117 | ||
115 | - run: echo "::set-env name=TAG::$(date --iso)" | 118 | - run: echo "::set-env name=TAG::$(date --iso)" |
119 | if: github.event_name == 'push' | ||
120 | - run: echo "::set-env name=TAG::nightly" | ||
121 | if: github.event_name != 'push' | ||
116 | - run: 'echo "TAG: $TAG"' | 122 | - run: 'echo "TAG: $TAG"' |
117 | 123 | ||
118 | - name: Checkout repository | 124 | - name: Checkout repository |
@@ -136,59 +142,18 @@ jobs: | |||
136 | path: dist | 142 | path: dist |
137 | - run: ls -all ./dist | 143 | - run: ls -all ./dist |
138 | 144 | ||
139 | - name: Create Release | 145 | - name: Publish Release |
140 | id: create_release | 146 | uses: ./.github/actions/github-release |
141 | # uses: actions/create-release@v1 | ||
142 | # https://github.com/actions/create-release/pull/32 | ||
143 | uses: fleskesvor/create-release@1a72e235c178bf2ae6c51a8ae36febc24568c5fe | ||
144 | env: | ||
145 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
146 | with: | ||
147 | tag_name: ${{ env.TAG }} | ||
148 | release_name: ${{ env.TAG }} | ||
149 | draft: false | ||
150 | prerelease: false | ||
151 | |||
152 | - uses: actions/[email protected] | ||
153 | env: | ||
154 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
155 | with: | ||
156 | upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
157 | asset_path: ./dist/rust-analyzer-linux | ||
158 | asset_name: rust-analyzer-linux | ||
159 | asset_content_type: application/octet-stream | ||
160 | |||
161 | - uses: actions/[email protected] | ||
162 | env: | ||
163 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
164 | with: | ||
165 | upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
166 | asset_path: ./dist/rust-analyzer-mac | ||
167 | asset_name: rust-analyzer-mac | ||
168 | asset_content_type: application/octet-stream | ||
169 | |||
170 | - uses: actions/[email protected] | ||
171 | env: | ||
172 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
173 | with: | ||
174 | upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
175 | asset_path: ./dist/rust-analyzer-windows.exe | ||
176 | asset_name: rust-analyzer-windows.exe | ||
177 | asset_content_type: application/octet-stream | ||
178 | |||
179 | - uses: actions/[email protected] | ||
180 | env: | ||
181 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
182 | with: | 147 | with: |
183 | upload_url: ${{ steps.create_release.outputs.upload_url }} | 148 | files: "dist/*" |
184 | asset_path: ./dist/rust-analyzer.vsix | 149 | name: ${{ env.TAG }} |
185 | asset_name: rust-analyzer.vsix | 150 | token: ${{ secrets.GITHUB_TOKEN }} |
186 | asset_content_type: application/octet-stream | ||
187 | 151 | ||
188 | - run: npm ci | 152 | - run: npm ci |
189 | working-directory: ./editors/code | 153 | working-directory: ./editors/code |
190 | 154 | ||
191 | - name: Publish Extension | 155 | - name: Publish Extension |
156 | if: github.event_name == 'push' | ||
192 | working-directory: ./editors/code | 157 | working-directory: ./editors/code |
193 | # token from https://dev.azure.com/rust-analyzer/ | 158 | # token from https://dev.azure.com/rust-analyzer/ |
194 | run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }} | 159 | run: npx vsce publish 0.1.$(date +%Y%m%d) --pat ${{ secrets.MARKETPLACE_TOKEN }} |