ci: fix workflow

This commit is contained in:
Lucaskyy 2022-05-24 17:29:26 +02:00
parent 639681160e
commit cc37d44a2e
No known key found for this signature in database
GPG Key ID: 1530BFF96D1EEB89

View File

@ -2,22 +2,11 @@ name: Release
on:
workflow_dispatch:
push:
branches: [master]
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
delete-old-versions:
name: Delete old versions
runs-on: ubuntu-latest
strategy:
matrix:
pkg: ['brut.j.common', 'brut.j.dir', 'brut.j.util', 'apktool-lib', 'apktool-cli']
steps:
- name: Delete package ${{ matrix.pkg }}
uses: actions/delete-package-versions@v3
with:
package-name: 'org.apktool.${{ matrix.pkg }}'
build:
name: Build
runs-on: ubuntu-latest
@ -38,10 +27,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew build
delete-old-versions:
name: Delete old versions
runs-on: ubuntu-latest
needs: [ build ]
strategy:
matrix:
pkg: [ 'brut.j.common', 'brut.j.dir', 'brut.j.util', 'apktool-lib', 'apktool-cli' ]
steps:
- name: Delete package ${{ matrix.pkg }}
uses: actions/delete-package-versions@v3
with:
package-name: 'org.apktool.${{ matrix.pkg }}'
release:
name: Release
runs-on: ubuntu-latest
needs: [build, delete-old-versions]
needs: [ delete-old-versions ]
steps:
- name: Publish to GitHub Packages
env: