Skip to content

Commit

Permalink
Merge pull request #379 from TwidereProject/feature/1.6.0-dev01
Browse files Browse the repository at this point in the history
update package to 1.6.0-dev01
  • Loading branch information
Tlaster authored Dec 25, 2021
2 parents 9f95260 + 446d382 commit 8f5b6cd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 60 deletions.
67 changes: 10 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,60 +108,13 @@ jobs:
steps:
- uses: actions/download-artifact@v2

- name: Check if is prelease
if: startsWith(github.ref, 'refs/tags/')
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+\-(dev|beta)[0-9]+$ ]]; then
echo ::set-output name=prelease::true
fi
- name: Create Prerelease
if: startsWith(github.ref, 'refs/tags/') && steps.check-tag.outputs.prelease == 'true'
run: |
set -x
assets=()
for asset in $(find -name *.deb); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.msi); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.dmg); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.apk); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.aab); do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name" -p
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
if: startsWith(github.ref, 'refs/tags/') && steps.check-tag.outputs.prelease != 'true'
run: |
set -x
assets=()
for asset in $(find -name *.deb); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.msi); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.dmg); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.apk); do
assets+=("-a" "$asset")
done
for asset in $(find -name *.aab); do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Draft a new release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
**/*.deb
**/*.msi
**/*.dmg
**/*.apk
**/*.aab
14 changes: 12 additions & 2 deletions buildSrc/src/main/kotlin/Package.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ object Package {
const val group = "com.twidere"
const val name = "Twidere X"
const val id = "$group.twiderex"
const val versionName = "1.5.1"
const val versionCode = 55
val versionName =
"${Version.main}.${Version.mirror}.${Version.patch}${if (Version.revision.isNotEmpty()) "-${Version.revision}" else ""}"
const val copyright = "Copyright (C) TwidereProject and Contributors"
const val versionCode = Version.build

object Version {
const val main = "1"
const val mirror = "6"
const val patch = "0"
const val revision = "dev01"
const val build = 56
}
}
4 changes: 3 additions & 1 deletion desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ compose {
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = Package.name
packageVersion = Package.versionName.split("-").firstOrNull()
packageVersion = "${Package.Version.main}.${Package.Version.mirror}.${Package.versionCode}"
copyright = Package.copyright
licenseFile.set(rootProject.file("LICENSE"))
modules("java.sql") // https://github.com/JetBrains/compose-jb/issues/381
modules("jdk.unsupported")
modules("jdk.unsupported.desktop")
Expand Down

0 comments on commit 8f5b6cd

Please sign in to comment.