-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from appsignal/add-release-ci
Add release publishing to Github Actions
- Loading branch information
Showing
13 changed files
with
250 additions
and
294 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: minor | ||
type: add | ||
--- | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Publish a release | ||
on: | ||
# Trigger this release via the GitHub Actions interface for this workflow | ||
workflow_dispatch: | ||
|
||
env: | ||
PUBLISH_GIT_USERNAME: "AppSignal release bot" | ||
PUBLISH_GIT_EMAIL: "[email protected]" | ||
PUBLISH_GIT_SSH_PATH: "/home/runner/.ssh" | ||
PUBLISH_GIT_SIGN_KEY_PATH: "/home/runner/.ssh/sign_key" | ||
|
||
jobs: | ||
publish: | ||
name: "Publish the release" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout the project" | ||
uses: actions/checkout@v4 | ||
with: | ||
ssh-key: "${{secrets.PUBLISH_DEPLOY_KEY}}" | ||
path: "main" | ||
|
||
- name: "Checkout Mono" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "appsignal/mono" | ||
path: "mono" | ||
|
||
- name: "Configure Git" | ||
run: | | ||
mkdir -p "$PUBLISH_GIT_SSH_PATH" | ||
echo "${{secrets.PUBLISH_GIT_SIGN_KEY}}" > "$PUBLISH_GIT_SIGN_KEY_PATH" | ||
echo "${{secrets.PUBLISH_GIT_SIGN_PUBLIC_KEY}}" > "$PUBLISH_GIT_SIGN_KEY_PATH.pub" | ||
chmod 600 "$PUBLISH_GIT_SIGN_KEY_PATH" | ||
git config --global user.name "$PUBLISH_GIT_USERNAME (as ${{github.actor}})" | ||
git config --global user.email "$PUBLISH_GIT_EMAIL" | ||
git config --global gpg.format ssh | ||
git config --global commit.gpgsign true | ||
touch ~/.ssh/allowed_signers | ||
echo "$(git config --get user.email) namespaces=\"git\" $(cat $PUBLISH_GIT_SIGN_KEY_PATH.pub)" >> ~/.ssh/allowed_signers | ||
git config --global user.signingkey "$PUBLISH_GIT_SIGN_KEY_PATH" | ||
- name: "Install Cross" | ||
run: | | ||
cargo install cross | ||
- name: "Login to Docker Hub" | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{secrets.PUBLISH_DOCKERHUB_USERNAME}} | ||
password: ${{secrets.PUBLISH_DOCKERHUB_TOKEN}} | ||
|
||
- name: "Build artifacts and push release tag" | ||
id: version | ||
working-directory: "./main" | ||
run: | | ||
../mono/bin/mono publish --no-package-push --yes | ||
export RELEASE_VERSION="$(script/read_version)" | ||
echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" | ||
echo "TAG_NAME=v$RELEASE_VERSION" >> "$GITHUB_OUTPUT" | ||
- name: "Create a release on the repository" | ||
working-directory: "./main" | ||
run: | | ||
gh release create ${{steps.version.outputs.TAG_NAME}} \ | ||
--title "${{steps.version.outputs.RELEASE_VERSION}}" \ | ||
--notes-from-tag \ | ||
--verify-tag \ | ||
'release/x86_64-unknown-linux-gnu.tar.gz#Linux (x86_64)' \ | ||
'release/x86_64-unknown-linux-musl.tar.gz#Linux (x86_64, musl)' \ | ||
'release/aarch64-unknown-linux-gnu.tar.gz#Linux (arm64)' \ | ||
'release/aarch64-unknown-linux-musl.tar.gz#Linux (arm64, musl)' | ||
env: | ||
GH_TOKEN: ${{github.token}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/target | ||
/release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# `appsignal-wrap` changelog | ||
|
Oops, something went wrong.