Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

gedoor 4 лет назад
Родитель
Сommit
8a135901b1
2 измененных файлов с 10 добавлено и 12 удалено
  1. 5 6
      .github/workflows/release.yml
  2. 5 6
      .github/workflows/test.yml

+ 5 - 6
.github/workflows/release.yml

@@ -82,14 +82,13 @@ jobs:
       - name: Push Assets To "release" Branch
         if: ${{ github.actor == 'gedoor' }}
         run: |
-          cd $GITHUB_WORKSPACE/apk || exit 1
-          git init
-          git config --local user.name "github-actions[bot]"
-          git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
-          git checkout -b release
+          git config --global user.name "github-actions[bot]"
+          git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git clone "https://${{ github.actor }}:${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.actor }}/release" -b release release-branch
+          mv -f $GITHUB_WORKSPACE/apk/*.apk release-branch
+          cd release-branch
           git add *.apk
           git commit -m "${{ env.RELEASE_VERSION }}"
-          git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.actor }}/release"
           git push -f -u origin release
       - name: Purge Jsdelivr Cache
         if: ${{ github.actor == 'gedoor' }}

+ 5 - 6
.github/workflows/test.yml

@@ -127,14 +127,13 @@ jobs:
         run: mv */*.apk . ;rm -rf */
       - name: Push To "test" Branch
         run: |
-          cd $GITHUB_WORKSPACE/apk
-          git init
-          git config --local user.name "github-actions[bot]"
-          git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
-          git checkout -b test
+          git config --global user.name "github-actions[bot]"
+          git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
+          git clone "https://${{ github.actor }}:${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.actor }}/release" -b test test-branch
+          mv -f $GITHUB_WORKSPACE/apk/*.apk test-branch
+          cd test-branch
           git add *.apk
           git commit -m "${{ needs.prepare.outputs.versionL }}"
-          git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.actor }}/release"
           git push -f -u origin test
 
   telegram: