Skip to content

Commit b98e7da

Browse files
committed
[mod-misty] ci: upload to prerelease to avoid artifact expire
1 parent a054a79 commit b98e7da

File tree

2 files changed

+79
-7
lines changed

2 files changed

+79
-7
lines changed

.github/workflows/build.yml

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,28 +184,28 @@ jobs:
184184
shell: bash
185185
run: |
186186
make quicktest
187-
if: matrix.quicktest
187+
if: false
188188

189189
- name: Race test
190190
shell: bash
191191
run: |
192192
make racequicktest
193-
if: matrix.racequicktest
193+
if: false
194194

195195
- name: Run librclone tests
196196
shell: bash
197197
run: |
198198
make -C librclone/ctest test
199199
make -C librclone/ctest clean
200200
librclone/python/test_rclone.py
201-
if: matrix.librclonetest
201+
if: false
202202

203203
- name: Compile all architectures test
204204
shell: bash
205205
run: |
206206
make
207207
make compile_all
208-
if: matrix.compile_all
208+
if: false
209209

210210
- name: Deploy built binaries
211211
shell: bash
@@ -218,14 +218,15 @@ jobs:
218218
rm rclonebuild/*latest*
219219
env:
220220
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
221+
# working-directory: '$(modulePath)'
222+
# Deploy binaries if enabled in config && not a PR && not a fork
223+
#if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'
224+
221225
- name: "Upload to github artifact"
222226
if: ${{ always() }}
223227
uses: NyaMisty/upload-artifact-as-is@nightly
224228
with:
225229
path: rclonebuild
226-
# working-directory: '$(modulePath)'
227-
# Deploy binaries if enabled in config && not a PR && not a fork
228-
#if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'
229230

230231
lint:
231232
if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }}
@@ -359,3 +360,35 @@ jobs:
359360
uses: NyaMisty/upload-artifact-as-is@nightly
360361
with:
361362
path: build
363+
364+
365+
release:
366+
name: "release"
367+
timeout-minutes: 60
368+
runs-on: ubuntu-latest
369+
needs: [build, android]
370+
if: always()
371+
steps:
372+
- name: "Create artifact directory"
373+
run: |
374+
mkdir -p rclonebuild
375+
- name: "Download all artifacts"
376+
uses: actions/download-artifact@v2
377+
with:
378+
path: rclonebuild
379+
- name: "Ensure at lease one build succeeded"
380+
run: |
381+
ls rclonebuild
382+
if [ "$(ls -A rclonebuild)" ]; then exit 0; else exit 1; fi
383+
- name: "Upload to Github Prerelease"
384+
uses: ncipollo/release-action@v1
385+
with:
386+
artifacts: "rclonebuild/*"
387+
token: ${{ secrets.GITHUB_TOKEN }}
388+
name: ${{ format('AutoBuild - {0}', github.event.commits[0].message) }}
389+
tag: "action_build"
390+
commit: master
391+
prerelease: true
392+
allowUpdates: true
393+
removeArtifacts: true
394+
artifactErrorsFailBuild: true
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Scheduled Merge Remote Action
2+
on:
3+
schedule:
4+
- cron: '20 * * * *'
5+
# scheduled for 00:00 everyday
6+
workflow_dispatch:
7+
8+
jobs:
9+
merge-upstream:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
ref: master # set the branch to merge to
16+
fetch-depth: 0
17+
- name: Setup committer
18+
run: |
19+
git config --global user.email "misty@misty.moe"
20+
git config --global user.name "NyaMisty"
21+
- name: Merge Upstream
22+
run: |
23+
git remote add -f upstream "https://github.com/rclone/rclone" &&
24+
git remote -v &&
25+
git branch --all &&
26+
git config --list &&
27+
git checkout master
28+
git rebase -v --fork-point --rebase-merges --keep-base master upstream/master
29+
git rebase --abort || true;
30+
31+
git branch -f master HEAD; git checkout master
32+
#- name: Prepare to push
33+
# run: git branch -f master
34+
- name: Push changes
35+
uses: ad-m/github-push-action@master
36+
with:
37+
github_token: ${{ secrets.WORKER_GITHUB_PAT }}
38+
branch: ${{ github.ref }}
39+
- uses: gautamkrishnar/keepalive-workflow@master # using the workflow with default settings

0 commit comments

Comments
 (0)