Skip to content

Commit

Permalink
feat: integrate Release Please (with GitHub Action)
Browse files Browse the repository at this point in the history
  • Loading branch information
vst committed Jun 2, 2024
1 parent a575d47 commit 84e3a90
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Release"

on:
push:
branches:
- "main"

permissions:
contents: "write"
pull-requests: "write"

jobs:
release-please:
runs-on: "ubuntu-latest"

steps:
- id: "release"
name: "Release"
uses: "google-github-actions/release-please-action@v4"

## TODO: Enable statically built executable as release artifact.
##
## See https://github.com/vst/postmap/issues/35

# - name: "Checkout Codebase"
# if: "${{ steps.release.outputs.release_created }}"
# uses: "actions/checkout@v4"
# with:
# fetch-depth: 0

# - name: "Install nix"
# if: "${{ steps.release.outputs.release_created }}"
# uses: "cachix/install-nix-action@v27"
# with:
# nix_path: "nixpkgs=channel:nixos-23.11"
# extra_nix_config: "system-features = benchmark, big-parallel, nixos-test, uid-range, kvm"

# - name: "Use magic Nix cache"
# if: "${{ steps.release.outputs.release_created }}"
# uses: "DeterminateSystems/magic-nix-cache-action@v6"

# - name: "Build Application"
# if: "${{ steps.release.outputs.release_created }}"
# run: |
# nix-shell --run "bash build-static.sh"

# - name: "Upload Release Artifact"
# if: "${{ steps.release.outputs.release_created }}"
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# run: |
# gh release upload "${{ steps.release.outputs.tag_name }}" /tmp/postmap-static-linux-x86_64
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
16 changes: 16 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "simple",
"changelog-path": "CHANGELOG.md",
"include-v-in-tag": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
"prerelease": false,
"initial-version": "0.0.1",
"extra-files": ["package.yaml"]
}
}
}

0 comments on commit 84e3a90

Please sign in to comment.