Skip to content

Commit

Permalink
ci: dissociate releasing from publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
loicrouchon committed Sep 10, 2023
1 parent 2809f41 commit 907c6db
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 50 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

release:
name: Release
if: startsWith(github.ref, 'refs/heads/release/')
# if: startsWith(github.ref, 'refs/heads/release/')
needs: [ env, test ]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -84,11 +84,12 @@ jobs:
- name: Run JReleaser
uses: jreleaser/release-action@v2
with:
version: 1.4.0
version: 1.8.0
arguments: release --dry-run
env:
JRELEASER_PROJECT_VERSION: ${{ steps.read-version.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# JRELEASER_HOMEBREW_GITHUB_TOKEN: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
Expand All @@ -99,13 +100,13 @@ jobs:
out/jreleaser/trace.log
out/jreleaser/release/CHANGELOG.md
- id: publish
env:
REPO_FEDORA_COPR_SYMLY_USERNAME: loicrouchon
REPO_FEDORA_COPR_SYMLY_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
REPO_SYMLY_DEBIAN_USERNAME: loicrouchon
REPO_SYMLY_DEBIAN_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub CI publisher bot"
make publish
# - id: publish
# env:
# REPO_FEDORA_COPR_SYMLY_USERNAME: loicrouchon
# REPO_FEDORA_COPR_SYMLY_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# REPO_SYMLY_DEBIAN_USERNAME: loicrouchon
# REPO_SYMLY_DEBIAN_PASSWORD: ${{ secrets.SYMLY_PUBLISH_REPOS_TOKEN }}
# run: |
# git config --global user.email "[email protected]"
# git config --global user.name "GitHub CI publisher bot"
# make publish
73 changes: 36 additions & 37 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,40 @@ distributions:

jvm:
artifacts:
- path: build/distributions/{{projectName}}-{{projectVersion}}.zip
- path: build/distributions/{{projectName}}-{{projectVersion}}.tar
- path: target/distributions/{{projectName}}-{{projectVersion}}-standalone.tar.gz

deb:
type: NATIVE_PACKAGE
artifacts:
- path: build/distributions/{{projectName}}_{{projectVersion}}-1_all.deb

rpm:
type: NATIVE_PACKAGE
artifacts:
- path: build/distributions/{{projectName}}-{{projectVersion}}-1.noarch.rpm

homebrew:
type: JAVA_BINARY
executable:
name: symly
artifacts:
- path: build/distributions/{{projectName}}-{{projectVersion}}-homebrew-bottle.zip
brew:
active: ALWAYS
formulaName: symly
commitAuthor:
name: jreleaserbot
email: [email protected]
tap:
owner: loicrouchon
name: homebrew-symly
multiPlatform: true
extraProperties:
skipJava: true # Avoids automatic dependency on fixed JDK
dependencies:
coreutils:
openjdk: # latest JDK

files:
artifacts:
- path: build/distributions/{{projectName}}.spec
# deb:
# type: NATIVE_PACKAGE
# artifacts:
# - path: build/distributions/{{projectName}}_{{projectVersion}}-1_all.deb
#
# rpm:
# type: NATIVE_PACKAGE
# artifacts:
# - path: build/distributions/{{projectName}}-{{projectVersion}}-1.noarch.rpm
#
# homebrew:
# type: JAVA_BINARY
# executable:
# name: symly
# artifacts:
# - path: build/distributions/{{projectName}}-{{projectVersion}}-homebrew-bottle.zip
# brew:
# active: ALWAYS
# formulaName: symly
# commitAuthor:
# name: jreleaserbot
# email: [email protected]
# tap:
# owner: loicrouchon
# name: homebrew-symly
# multiPlatform: true
# extraProperties:
# skipJava: true # Avoids automatic dependency on fixed JDK
# dependencies:
# coreutils:
# openjdk: # latest JDK
#
#files:
# artifacts:
# - path: build/distributions/{{projectName}}.spec

0 comments on commit 907c6db

Please sign in to comment.