Skip to content

Commit 426e9d2

Browse files
committed
Create a release
1 parent fd64902 commit 426e9d2

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

.github/workflows/docker-publish.yml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,51 @@ jobs:
5959
username: ${{ secrets.DOCKER_USERNAME }}
6060
password: ${{ secrets.DOCKER_PASSWORD }}
6161
repository: ${{ env.DOCKER_IMAGE }}
62-
readme-filepath: ./README.md
62+
readme-filepath: ./README.md
63+
64+
- name: Generate release tag
65+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/develop'
66+
id: tag
67+
run: |
68+
# Generate a version tag based on date and commit
69+
TAG="v$(date +'%Y.%m.%d')-${{ env.TAG_VERSION }}"
70+
echo "tag=$TAG" >> $GITHUB_OUTPUT
71+
echo "Generated tag: $TAG"
72+
73+
- name: Create GitHub Release
74+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/develop'
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: |
78+
# Create release using GitHub CLI
79+
gh release create ${{ steps.tag.outputs.tag }} \
80+
--title "Docker Image ${{ steps.tag.outputs.tag }}" \
81+
--notes "## 🐳 Docker Image Release
82+
83+
**Docker Image**: \`${{ env.DOCKER_IMAGE }}:latest\`
84+
**Version Tag**: \`${{ env.DOCKER_IMAGE }}:${{ env.TAG_VERSION }}\`
85+
86+
### 📦 What's Included
87+
- Ubuntu 22.04 LTS
88+
- Android SDK 34.0.0 with command line tools
89+
- Java 17 (OpenJDK)
90+
- Node.js 18 LTS
91+
- Gradle 8.5
92+
- Yarn latest
93+
- Fastlane latest
94+
95+
### 🚀 Usage
96+
\`\`\`bash
97+
# Use in GitLab CI
98+
image: ${{ env.DOCKER_IMAGE }}:latest
99+
100+
# Or use the version tag
101+
image: ${{ env.DOCKER_IMAGE }}:${{ env.TAG_VERSION }}
102+
\`\`\`
103+
104+
### 🔗 Links
105+
- [Docker Hub Repository](https://hub.docker.com/r/${{ env.DOCKER_IMAGE }})
106+
- [GitHub Repository](https://github.com/${{ github.repository }})
107+
108+
**Commit**: ${{ github.sha }}
109+
**Build Date**: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"

GITHUB_ACTIONS_SETUP.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ The workflow will automatically create the following tags:
4646
- `android-34.0.0` (version tag)
4747
- Branch-specific tags for development
4848

49-
### 4. Manual Trigger
49+
### 4. GitHub Releases
50+
51+
The workflow automatically creates GitHub releases when building from the `develop` branch:
52+
- **Release Tag Format**: `v2025.01.09-android-34.0.0` (date + Android version)
53+
- **Release Notes**: Include complete documentation of what's included in the image
54+
- **Links**: Direct links to Docker Hub and usage instructions
55+
56+
### 5. Manual Trigger
5057

5158
You can manually trigger the workflow:
5259
1. Go to **Actions** tab in your repository

0 commit comments

Comments
 (0)