added gitea workflows
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
name: Release APK
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: |
|
||||
TAG=${GITHUB_REF#refs/tags/}
|
||||
VERSION=${TAG#v}
|
||||
echo "TAG=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build Release APK
|
||||
run: ./gradlew assembleRelease --stacktrace
|
||||
|
||||
- name: Rename APK
|
||||
run: |
|
||||
mv app/build/outputs/apk/release/app-release-unsigned.apk \
|
||||
app/build/outputs/apk/release/iTartanas-${{ steps.version.outputs.VERSION }}-release.apk
|
||||
|
||||
- name: Generate Changelog
|
||||
id: changelog
|
||||
run: |
|
||||
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
|
||||
git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty=format:"- %s" >> $GITHUB_OUTPUT
|
||||
echo "" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.version.outputs.TAG }}
|
||||
release_name: iTartanas ${{ steps.version.outputs.VERSION }}
|
||||
body: |
|
||||
# 🎉 iTartanas ${{ steps.version.outputs.VERSION }}
|
||||
|
||||
## 📱 Descarga
|
||||
|
||||
APK de release sin firmar (para desarrollo/testing)
|
||||
|
||||
## 📝 Cambios
|
||||
|
||||
${{ steps.changelog.outputs.CHANGELOG }}
|
||||
|
||||
## 📊 Información
|
||||
|
||||
- **Versión**: ${{ steps.version.outputs.VERSION }}
|
||||
- **Commit**: ${{ github.sha }}
|
||||
- **Fecha**: ${{ github.event.head_commit.timestamp }}
|
||||
|
||||
## 🔒 Nota de Seguridad
|
||||
|
||||
Este APK no está firmado. Para producción, deberás firmarlo con tu keystore.
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release APK
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: app/build/outputs/apk/release/iTartanas-${{ steps.version.outputs.VERSION }}-release.apk
|
||||
asset_name: iTartanas-${{ steps.version.outputs.VERSION }}-release.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
Reference in New Issue
Block a user