Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHalko committed Dec 31, 2023
1 parent ce42f42 commit dfca3ab
Show file tree
Hide file tree
Showing 6 changed files with 538 additions and 31 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ jobs:
- name: Setup semantic-release
run: npm install

- name: Bump version code
- name: Get version code
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
run: |
npx semantic-release --extends ./.releaserc.versioncode.json
- name: Set env
run: |
echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(cat .VERSION)" >> $GITHUB_ENV
- name: Delete version code
run: git tag -d v${{ env.RELEASE_VERSION }}

- name: Rename APK
run: mv build/app/outputs/apk/release/app-release.apk revanced-manager-${{ env.RELEASE_VERSION }}.apk

- name: Publish release APK
uses: "svenstaro/upload-release-action@v2"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: ${{ env.BRANCH == 'dev' }}
tag: ${{ env.RELEASE_VERSION }}
file: revanced-manager-${{ env.RELEASE_VERSION }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --extends ./.releaserc.release.json
37 changes: 37 additions & 0 deletions .releaserc.bump.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer", {
"releaseRules": [
{ "type": "build", "scope": "Needs bump", "release": "patch" }
]
}
],
[
"@droidsolutions-oss/semantic-release-update-file",
{
"files": [
{
"path": ["pubspec.yaml"],
"type": "flutter",
"branches": ["main", "dev"]
}
]
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "echo ${nextRelease.version} > .VERSION"
}
]
]
}

19 changes: 9 additions & 10 deletions .releaserc → .releaserc.release.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,22 @@
"@semantic-release/changelog",
"@semantic-release/release-notes-generator",
[
"@droidsolutions-oss/semantic-release-update-file",
"@semantic-release/git",
{
"files": [
{
"path": ["pubspec.yaml"],
"type": "flutter",
"branches": ["main", "dev"]
}
"assets": [
"pubspec.yaml"
]
}
],
[
"@semantic-release/git",
"@semantic-release/github",
{
"assets": [
"pubspec.yaml"
]
{
"path": "build/app/outputs/apk/release/*.apk"
}
],
"successComment": false
}
],
[
Expand Down
Loading

0 comments on commit dfca3ab

Please sign in to comment.