-
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 #3 from emic/develop
Release XMLPaste 1.1.0
- Loading branch information
Showing
13 changed files
with
218 additions
and
49 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: build | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: Build | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners | ||
os: [ macos-12, macos-13, macos-14, macos-latest, windows-2019, windows-2022, windows-latest ] | ||
go: [ '1.22' ] | ||
steps: | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
cache: false | ||
go-version: ${{ matrix.go }} | ||
check-latest: true | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- shell: bash | ||
run: echo "xmlpaste_version=1.1.0" >> "$GITHUB_ENV" | ||
|
||
- if: runner.os == 'macOS' | ||
run: make dist && cp -p "dist/xmlpaste-${{ env.xmlpaste_version }}-macos/xmlpaste" . | ||
|
||
- if: runner.os == 'Windows' | ||
run: go build -ldflags "-X main.version=${{ env.xmlpaste_version }}" xmlpaste.go xmlpaste_windows.go | ||
|
||
- shell: bash | ||
run: echo "goss_commit_hash=aed56336c3e8ff683e9540065b502f423dd6760d" >> "$GITHUB_ENV" # v0.4.8 | ||
|
||
- shell: bash | ||
run: echo "GOSS_USE_ALPHA=1" >> "$GITHUB_ENV" | ||
|
||
- if: runner.os == 'macOS' | ||
run: | | ||
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz | ||
tar xzvf goss.tar.gz | ||
cd "goss-${{ env.goss_commit_hash }}" | ||
make build | ||
cd .. | ||
- if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz | ||
tar xzvf goss.tar.gz | ||
cd "goss-${{ env.goss_commit_hash }}" | ||
go build -o goss-windows-amd64.exe github.com/goss-org/goss/cmd/goss | ||
mkdir release | ||
mv goss-windows-amd64.exe release/ | ||
cd .. | ||
- if: runner.os == 'macOS' | ||
run: | | ||
OS=darwin "./goss-${{ env.goss_commit_hash }}/release/goss-darwin-amd64" --gossfile tests/goss.yaml validate --format documentation | ||
- if: runner.os == 'Windows' | ||
shell: bash | ||
run: | | ||
OS=windows "./goss-${{ env.goss_commit_hash }}/release/goss-windows-amd64.exe" --gossfile tests/goss.yaml validate --format documentation | ||
- run: ./xmlpaste -v | ||
|
||
# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml |
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,58 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Release | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
go: [ '1.22' ] | ||
steps: | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
cache: false | ||
go-version: ${{ matrix.go }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- run: make dist | ||
|
||
|
||
- name: Set version | ||
id: version | ||
run: | | ||
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g") | ||
echo ::set-output name=version::$VERSION | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.version.outputs.version }} | ||
release_name: XMLPaste ${{ steps.version.outputs.version }} Released | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Upload Release Asset for Windows (x64) | ||
id: upload-release-asset-for-windows-x64 | ||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/xmlpaste-${{ steps.version.outputs.version }}-windows-x64.zip | ||
asset_name: xmlpaste-${{ steps.version.outputs.version }}-windows-x64.zip | ||
asset_content_type: application/zip |
This file was deleted.
Oops, something went wrong.
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
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,3 @@ | ||
module github.com/emic/XMLPaste | ||
|
||
go 1.22 |
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 @@ | ||
XMLPaste is a command line tool to paste XML text of FileMaker clipboard objects. |
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,24 @@ | ||
command: | ||
{{if eq .Env.OS "darwin"}} | ||
print-version: | ||
exec: "./xmlpaste -v" | ||
exit-status: 0 | ||
stdout: | ||
- "1.1.0" | ||
{{end}} | ||
|
||
{{if eq .Env.OS "windows"}} | ||
print-version: | ||
exec: "xmlpaste.exe -v" | ||
exit-status: 0 | ||
stdout: "XMLPaste 1.1.0\n" | ||
{{end}} | ||
|
||
{{if eq .Env.OS "darwin"}} | ||
check-universal-binary-or-not: | ||
exec: "file ./xmlpaste" | ||
exit-status: 0 | ||
stdout: | ||
- "Mach-O 64-bit executable x86_64" | ||
- "Mach-O 64-bit executable arm64" | ||
{{end}} |
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