Skip to content

Commit

Permalink
Merge pull request #19 from WHO53/gh-action
Browse files Browse the repository at this point in the history
[ci] depreciation warnings fix
  • Loading branch information
g7 authored Aug 15, 2024
2 parents 8a7e8bf + 0033e7f commit c7acf12
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Generate matrix
id: gen-matrix
run: |
JOBS="$(./generate_device_recipe.py --matrix)"
echo ::set-output name=matrix::${JOBS}
echo "matrix=${JOBS}" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
run: echo "DROIDIAN_IDENTIFIER=${{ matrix.config.product }}-${{ matrix.config.arch }}-${{ matrix.config.edition }}-${{ matrix.config.variant }}-${{ matrix.config.apilevel }}" >> $GITHUB_ENV

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: 'true'
submodules: 'recursive'
Expand All @@ -62,7 +62,7 @@ jobs:
run: git submodule update --init --recursive

- name: QEMU set-up
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Create build dir
run: mkdir -p /tmp/buildd-results
Expand All @@ -78,7 +78,7 @@ jobs:
docker exec $CONTAINER_HASH /bin/sh -c 'cd /buildd/sources; DROIDIAN_VERSION="${{ env.DROIDIAN_VERSION }}" ./generate_device_recipe.py ${{ matrix.config.product }} ${{ matrix.config.arch }} ${{ matrix.config.edition }} ${{ matrix.config.variant }} ${{ matrix.config.apilevel }} && debos --disable-fakemachine generated/droidian.yaml'
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: droidian-out-${{ matrix.config.product }}-${{ matrix.config.arch }}-${{ matrix.config.edition }}-${{ matrix.config.variant }}-${{ matrix.config.apilevel }}
path: out/*
Expand All @@ -93,6 +93,9 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}${{ steps.create_nightly.outputs.upload_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Free up some storage
uses: jlumbroso/free-disk-space@main
with:
Expand All @@ -103,24 +106,17 @@ jobs:
large-packages: true
swap-storage: true

- name: Delete old nightly release
uses: dev-drprasad/[email protected]
if: startsWith(github.ref, 'refs/tags/droidian') != true
with:
delete_release: true # default: false
tag_name: nightly # tag name to delete
- name: Nightly tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Tag snapshot
if: startsWith(github.ref, 'refs/tags/droidian') != true
uses: tvdias/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
tag: nightly
run: |
gh release delete nightly --yes | true
git push --delete origin refs/tags/nightly || true
gh release create nightly
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: droidian-out

Expand All @@ -136,7 +132,7 @@ jobs:
- name: Create stable release (drafted)
id: create_release
if: startsWith(github.ref, 'refs/tags/droidian')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: droidian-out/SHA256SUMS
tag_name: ${{ github.ref }}
Expand All @@ -146,7 +142,7 @@ jobs:
- name: Create nightly release
id: create_nightly
if: startsWith(github.ref, 'refs/tags/droidian') != true
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: droidian-out/SHA256SUMS
tag_name: nightly
Expand All @@ -168,15 +164,15 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: droidian-out-${{ matrix.config.product }}-${{ matrix.config.arch }}-${{ matrix.config.edition }}-${{ matrix.config.variant }}-${{ matrix.config.apilevel }}
path: droidian-out

- name: Create stable release (drafted)
id: create_release
if: startsWith(github.ref, 'refs/tags/droidian')
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: droidian-out/*
tag_name: ${{ github.ref }}
Expand All @@ -186,7 +182,7 @@ jobs:
- name: Create nightly release
id: create_nightly
if: startsWith(github.ref, 'refs/tags/droidian') != true
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: droidian-out/*
tag_name: nightly
Expand Down

0 comments on commit c7acf12

Please sign in to comment.