Skip to content

Commit 888e30c

Browse files
revert tmp test changes, add clean up remove release branch
1 parent 4cac4dc commit 888e30c

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

.github/workflows/release.yml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Release
22
on:
3-
pull_request:
43
workflow_dispatch:
54
inputs:
65
version:
@@ -13,55 +12,55 @@ env:
1312
GH_TOKEN: ${{ github.token }}
1413

1514
jobs:
16-
# bump-version:
17-
# runs-on: ubuntu-latest
18-
# name: 'Prepare Release'
19-
# steps:
20-
# - name: Set environment variables
21-
# run: |
22-
# echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
23-
24-
# - uses: actions/checkout@v4
25-
26-
# - uses: actions/setup-node@v4
27-
# with:
28-
# node-version: 18
29-
# cache: 'npm'
30-
# cache-dependency-path: package-lock.json
31-
32-
# - name: Install dependencies
33-
# run: npm ci
34-
35-
# - name: Bump Version
36-
# run: |
37-
# git config user.name getsentry-bot
38-
# git config user.email [email protected]
39-
40-
# git checkout -b release/${{ env.VERSION }}
41-
# npm version ${{ env.VERSION }}
42-
# git tag --force ${{ env.VERSION }} -m ${{ env.VERSION }}
43-
# git push origin ${{ env.VERSION }}
44-
# git push origin release/${{ env.VERSION }}
45-
46-
# build-android:
47-
# name: 'Build Android'
48-
# needs: [bump-version]
49-
# uses: ./.github/workflows/build-android.yml
50-
# secrets: inherit
51-
# with:
52-
# ref: release/${{ inputs.version }}
53-
54-
# build-ios:
55-
# name: 'Build iOS'
56-
# needs: [bump-version]
57-
# uses: ./.github/workflows/build-ios.yml
58-
# secrets: inherit
59-
# with:
60-
# ref: release/${{ inputs.version }}
15+
bump-version:
16+
runs-on: ubuntu-latest
17+
name: 'Prepare Release'
18+
steps:
19+
- name: Set environment variables
20+
run: |
21+
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
22+
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 18
28+
cache: 'npm'
29+
cache-dependency-path: package-lock.json
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Bump Version
35+
run: |
36+
git config user.name getsentry-bot
37+
git config user.email [email protected]
38+
39+
git checkout -b release/${{ env.VERSION }}
40+
npm version ${{ env.VERSION }}
41+
git tag --force ${{ env.VERSION }} -m ${{ env.VERSION }}
42+
git push origin ${{ env.VERSION }}
43+
git push origin release/${{ env.VERSION }}
44+
45+
build-android:
46+
name: 'Build Android'
47+
needs: [bump-version]
48+
uses: ./.github/workflows/build-android.yml
49+
secrets: inherit
50+
with:
51+
ref: release/${{ inputs.version }}
52+
53+
build-ios:
54+
name: 'Build iOS'
55+
needs: [bump-version]
56+
uses: ./.github/workflows/build-ios.yml
57+
secrets: inherit
58+
with:
59+
ref: release/${{ inputs.version }}
6160

6261
publish-release:
6362
name: 'Publish Release'
64-
# needs: [bump-version, build-android]
63+
needs: [bump-version, build-android]
6564
runs-on: ubuntu-latest
6665
env:
6766
MERGE_TARGET: master-test
@@ -74,30 +73,30 @@ jobs:
7473
with:
7574
fetch-depth: 0 # fetch all history all branches and tags
7675

77-
# - name: Download iOS App
78-
# uses: actions/download-artifact@v4
79-
# with:
80-
# name: empower-plant-react-native-ios
76+
- name: Download iOS App
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: empower-plant-react-native-ios
8180

82-
# - name: Download Android APK
83-
# uses: actions/download-artifact@v4
84-
# with:
85-
# name: empower-plant-react-native-android
81+
- name: Download Android APK
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: empower-plant-react-native-android
8685

8786
- name: Set GitHub user
8887
run: |
8988
git config user.name getsentry-bot
9089
git config user.email [email protected]
9190
92-
# - name: Create Release
93-
# run: |
94-
# gh release create \
95-
# ${{ env.VERSION }} \
96-
# ${{ env.APK_PATH }} \
97-
# ${{ env.APP_ARCHIVE_PATH }} \
98-
# --title ${{ env.VERSION }} \
99-
# --notes "Release ${{ env.VERSION }}" \
100-
# || error_exit "Failed to create GitHub release."
91+
- name: Create Release
92+
run: |
93+
gh release create \
94+
${{ env.VERSION }} \
95+
${{ env.APK_PATH }} \
96+
${{ env.APP_ARCHIVE_PATH }} \
97+
--title ${{ env.VERSION }} \
98+
--notes "Release ${{ env.VERSION }}" \
99+
|| error_exit "Failed to create GitHub release."
101100
102101
- name: Merge Release
103102
run: |
@@ -106,3 +105,4 @@ jobs:
106105
git checkout ${{ env.MERGE_TARGET }}
107106
git merge release/${{ env.VERSION }} --no-ff
108107
git push origin ${{ env.MERGE_TARGET }}
108+
git push origin --delete release/${{ env.VERSION }}

0 commit comments

Comments
 (0)