diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index d1894e6..bc2b971 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -3,8 +3,6 @@ on: push: branches: - master - tags: - - v* pull_request: branches: - master @@ -32,26 +30,32 @@ jobs: ./.github/workflows/csclient_compare.sh shell: bash - name: Run make build and clean - if: github.event_name == 'pull_request' run: | chmod +x ./.github/workflows/builds.sh ./.github/workflows/builds.sh shell: bash - name: Tag - if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v') - run: | - git config --global user.name 'Github actions auto build packages' - git config --global user.email 'Github_actions_auto_build_packages@users.noreply.github.com' - chmod +x ./.github/workflows/builds.sh - ./.github/workflows/builds.sh - git tag -a v1 -m "v1" - git push origin --tags - shell: bash + if: github.event_name == 'push' + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.deleteRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/built_apps" + }) + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/built_apps", + sha: context.sha + }) - name: Publish - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') - uses: softprops/action-gh-release@v1 + if: github.event_name == 'push' + uses: ncipollo/release-action@v1 # TODO: if any of the build step fails, the release should be deleted. with: - files: 'built_apps/*' - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file + artifacts: 'built_apps/*' + tag: "built_apps" + token: ${{ secrets.TOKEN }} \ No newline at end of file