diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 14da363..b7126fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,10 +100,15 @@ jobs: ./dist/*.tar.gz ./dist/*.whl - - name: Create GitHub Release + - name: Create GitHub Release for pip/python (0.0.0) env: GITHUB_TOKEN: ${{ github.token }} - run: gh release create '${{ needs.tag-release-on-push.outputs.new_tag }}' --repo '${{ github.repository }}' --notes "" + run: gh release create '${{ needs.tag-release-on-push.outputs.new_tag }}' --repo '${{ github.repository }}' --generate-notes + + - name: Create GitHub Actions Semver Release (v0.0.0) + env: + GITHUB_TOKEN: ${{ github.token }} + run: gh release create 'v${{ needs.tag-release-on-push.outputs.new_tag }}' --repo '${{ github.repository }}' --notes "GitHub Actions semver release" - name: Upload artifact signatures to GitHub Release env: diff --git a/README.md b/README.md index 36644f1..72108d1 100644 --- a/README.md +++ b/README.md @@ -63,5 +63,68 @@ Options: $ sap /path/to/app/folder --prod ``` +## Use as GitHub Action + +### Example production deployment + +```yaml +name: Production Deployment + +on: + push: + branches: + - main + paths: + - APP_NAME/** + workflow_dispatch: + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: dfe-digital/splunk-app-packager@v0.0.2 + with: + app_package_path: 'APP_NAME' + splunk_username: ${{ secrets.SPLUNK_USERNAME }} + splunk_password: ${{ secrets.SPLUNK_PASSWORD }} + splunk_acs_token: ${{ secrets.SPLUNK_ACS_TOKEN }} + splunk_acs_stack: ${{ secrets.SPLUNK_ACS_STACK }} +``` + +### Example with a different path for config.toml + +```yaml +name: Production Deployment + +on: + push: + branches: + - main + paths: + - APP_NAME/** + workflow_dispatch: + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: dfe-digital/splunk-app-packager@v0.0.2 + with: + app_package_path: 'APP_NAME' + splunk_username: ${{ secrets.SPLUNK_USERNAME }} + splunk_password: ${{ secrets.SPLUNK_PASSWORD }} + splunk_acs_token: ${{ secrets.SPLUNK_ACS_TOKEN }} + splunk_acs_stack: ${{ secrets.SPLUNK_ACS_STACK }} + config_toml_path: 'conf/config.toml' +``` + ## Contributing Refer to [our contributing guidelines](.github/CONTRIBUTING.md) if you'd like to raise a bug or pull request. \ No newline at end of file