Skip to content

Commit

Permalink
ci: retain artifacts only
Browse files Browse the repository at this point in the history
  • Loading branch information
rumblefrog authored May 7, 2023
1 parent fac1f35 commit 02825c3
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,58 +30,3 @@ jobs:
with:
name: ${{ runner.os }}
path: /tmp/package

tag:
name: Tag
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/php81'

- uses: dev-drprasad/[email protected]
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/php81'
with:
delete_release: true
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: rickstaa/action-create-tag@v1
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/php81'
with:
tag: "latest"
github_token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/php81'
needs: [build, tag]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3

- name: Versioning
run: |
version="latest"
if [[ "${{ github.ref_type }}" == 'tag' ]]; then
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`;
fi
echo "RELEASE_VERSION=$version" >> $GITHUB_ENV
- name: Package
run: |
ls -Rall
if [ -d "./Linux/" ]; then
cd ./Linux/
tar -czf ../${{ github.event.repository.name }}-${{ env.RELEASE_VERSION }}.tar.gz -T <(\ls -1)
cd -
fi
- name: Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.tar.gz'
tag: ${{ env.RELEASE_VERSION }}
file_glob: true
overwrite: true

0 comments on commit 02825c3

Please sign in to comment.