generated from cheqd/.github
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Prepare for being public
- Loading branch information
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
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
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
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,66 @@ | ||
name: "Release" | ||
on: | ||
workflow_call: | ||
inputs: | ||
RELEASE_VERSION: | ||
description: "Release version number" | ||
required: true | ||
type: string | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
make-release: | ||
runs-on: ubuntu-latest | ||
env: | ||
RELEASE_VERSION: ${{ inputs.RELEASE_VERSION }} | ||
REGISTRY: ghcr.io | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
|
||
- name: Login to Container registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Download resolver Docker image | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: cheqd-did-resolver.tar | ||
|
||
- name: Load resolver Docker image | ||
run: | | ||
docker load -i cheqd-did-resolver.tar | ||
rm cheqd-did-resolver.tar | ||
- name: Push cheqd-node image | ||
run: | | ||
docker tag cheqd-did-resolver ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | ||
docker tag cheqd-did-resolver ghcr.io/${{ github.repository }}:latest | ||
docker push ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | ||
docker push ghcr.io/${{ github.repository }}:latest | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload assets | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: did-resolver | ||
path: dist/* |
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,11 @@ | ||
release: | ||
prerelease: "true" | ||
builds: | ||
- env: [CGO_ENABLED=0] | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 |