Skip to content

Commit

Permalink
feat: setup release please
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Mar 28, 2023
1 parent 2dd68ae commit 1e8ae6a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,22 @@ jobs:
release:
name: Check version & Create release
permissions:
contents: write # to create release commit
pull-requests: write # to create release PR
runs-on: ubuntu-latest
needs: build
outputs:
released: ${{ steps.check.outputs.version }} # expose release.outputs.released for the "publish" job
# expose release.outputs.released for the "publish" job
released: ${{ steps.release.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: EndBug/version-check@v2
id: check
with:
file-name: haxelib.json
diff-search: true
- name: Create Release
if: steps.check.outputs.changed == 'true'
uses: softprops/action-gh-release@v1
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.check.outputs.version }}
name: ${{ steps.check.outputs.version }}
draft: false
prerelease: false
command: manifest

publish:
name: Publish to Haxelib
Expand All @@ -56,7 +51,7 @@ jobs:
- uses: actions/checkout@v3
- uses: krdlab/setup-haxe@v1
with:
haxe-version: 4.1.2
haxe-version: 4.2.5
- run: |
haxe -version
haxelib --debug submit . "$HAXELIB_PASSWORD"
Expand Down
9 changes: 9 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extra-files": [
{
"type": "json",
"path": "haxelib.json",
"jsonpath": "$.version"
}
]
}

0 comments on commit 1e8ae6a

Please sign in to comment.