mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
fix(ci): switch to pre-emptive tagging workflow (#4414)
This commit is contained in:
parent
773b481a58
commit
cf0af91ae1
2 changed files with 10 additions and 116 deletions
75
.github/workflows/release.yml
vendored
75
.github/workflows/release.yml
vendored
|
|
@ -73,29 +73,10 @@ jobs:
|
|||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Download Release SHA Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: release_sha
|
||||
path: .
|
||||
|
||||
- name: Resolve Commit SHA
|
||||
id: resolve_sha
|
||||
run: |
|
||||
if [ -f release_sha.txt ]; then
|
||||
SHA=$(cat release_sha.txt)
|
||||
echo "Using SHA from artifact: $SHA"
|
||||
echo "SHA=$SHA" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Using input SHA or Tag"
|
||||
echo "SHA=${{ inputs.commit_sha || inputs.tag_name }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ steps.resolve_sha.outputs.SHA }}
|
||||
ref: ${{ inputs.tag_name }}
|
||||
fetch-depth: 0
|
||||
submodules: 'recursive'
|
||||
- name: Set up JDK 17
|
||||
|
|
@ -130,39 +111,16 @@ jobs:
|
|||
echo "versionCode=$VERSION_CODE" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
release-google:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [prepare-build-info, run-lint]
|
||||
environment: Release
|
||||
env:
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
GRADLE_CACHE_URL: ${{ secrets.GRADLE_CACHE_URL }}
|
||||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Download Release SHA Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: release_sha
|
||||
path: .
|
||||
|
||||
- name: Resolve Commit SHA
|
||||
id: resolve_sha
|
||||
run: |
|
||||
if [ -f release_sha.txt ]; then
|
||||
SHA=$(cat release_sha.txt)
|
||||
echo "Using SHA from artifact: $SHA"
|
||||
echo "SHA=$SHA" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Using input SHA or Tag"
|
||||
echo "SHA=${{ inputs.commit_sha || inputs.tag_name }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ steps.resolve_sha.outputs.SHA }}
|
||||
ref: ${{ inputs.tag_name }}
|
||||
fetch-depth: 0
|
||||
submodules: 'recursive'
|
||||
- name: Set up JDK 17
|
||||
|
|
@ -266,29 +224,10 @@ jobs:
|
|||
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
|
||||
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
|
||||
steps:
|
||||
- name: Download Release SHA Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: release_sha
|
||||
path: .
|
||||
|
||||
- name: Resolve Commit SHA
|
||||
id: resolve_sha
|
||||
run: |
|
||||
if [ -f release_sha.txt ]; then
|
||||
SHA=$(cat release_sha.txt)
|
||||
echo "Using SHA from artifact: $SHA"
|
||||
echo "SHA=$SHA" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Using input SHA or Tag"
|
||||
echo "SHA=${{ inputs.commit_sha || inputs.tag_name }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ steps.resolve_sha.outputs.SHA }}
|
||||
ref: ${{ inputs.tag_name }}
|
||||
fetch-depth: 0
|
||||
submodules: 'recursive'
|
||||
- name: Set up JDK 17
|
||||
|
|
@ -344,15 +283,9 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.commit_sha || inputs.tag_name }}
|
||||
ref: ${{ inputs.tag_name }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push Git Tag on Success
|
||||
if: ${{ inputs.commit_sha != '' }}
|
||||
run: |
|
||||
git tag ${{ inputs.tag_name }} ${{ inputs.commit_sha }}
|
||||
git push origin ${{ inputs.tag_name }}
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue