@@ -11,12 +11,14 @@ jobs:
1111 build :
1212 name : Build
1313 runs-on : ubuntu-latest
14- container : analogj/capsulecd-build
14+ container : ghcr.io/packagrio/packagr-dev:master
1515 env :
1616 PROJECT_PATH : /go/src/github.com/packagrio/releasr
1717 steps :
1818 - name : Checkout
1919 uses : actions/checkout@v2
20+ with :
21+ fetch-depth : 0
2022 - name : Bump version
2123 id : bump_version
2224 uses : packagrio/action-bumpr-go@master
3032 GOOS : linux
3133 GOARCH : amd64
3234 run : |
33-
3435 mkdir -p $PROJECT_PATH
3536 cp -a $GITHUB_WORKSPACE/. $PROJECT_PATH/
3637 cd $PROJECT_PATH
@@ -43,79 +44,23 @@ jobs:
4344 # build linux binary
4445 . /scripts/toolchains/linux/linux-build-env.sh && go build -mod vendor -ldflags "-X main.goos=linux -X main.goarch=amd64" -o packagr-releasr-linux-amd64 -tags "static" cmd/releasr/releasr.go
4546
46- # build mac binary
47- cp /usr/local/osx-ndk-x86/macports/pkgs/opt/local/lib/pkgconfig/libgit2.pc vendor/gopkg.in/libgit2/git2go.v25/vendor/libgit2/build/libgit2.pc
48- . /scripts/toolchains/osx/osx-build-env.sh && go build -mod vendor -ldflags "-X main.goos=darwin -X main.goarch=amd64" -o packagr-releasr-darwin-amd64 -tags "static" cmd/releasr/releasr.go
49-
50-
5147 chmod +x packagr-releasr-linux-amd64
52- chmod +x packagr-releasr-darwin-amd64
5348 ./packagr-releasr-linux-amd64 --help
5449 echo "listing linked libraries" && ldd packagr-releasr-linux-amd64
5550
56- - name : Commit
57- uses : EndBug/add-and-commit@v4 # You can change this to use a specific version
58- with :
59-
60- # The name of the user that will be displayed as the author of the commit
61- # Default: author of the commit that triggered the run
62- author_name : Jason Kulatunga
63-
64- # The email of the user that will be displayed as the author of the commit
65- # Default: author of the commit that triggered the run
66- author_email : jason@thesparktree.com
67-
68- # The local path to the directory where your repository is located. You should use actions/checkout first to set it up
69- # Default: '.'
70- cwd : ${{ env.PROJECT_PATH }}
71-
72- # Whether to use the --force option on `git add`, in order to bypass eventual gitignores
73- # Default: false
74- force : false
75-
76- # Whether to use the --signoff option on `git commit`
77- # Default: false
78- signoff : true
79-
80- # The message for the commit
81- # Default: 'Commit from GitHub Actions'
82- message : ' (${{steps.bump_version.outputs.release_version}}) Automated packaging of release by Packagr'
83-
84- # Name of the tag to add to the new commit (see the paragraph below for more info)
85- # Default: ''
86- tag : ${{steps.bump_version.outputs.release_version}}
87-
51+ # restore modified dir to GH workspace.
52+ cp -arf $PROJECT_PATH/. $GITHUB_WORKSPACE/
53+ - name : Commit Changes
54+ id : commit
55+ uses : packagrio/action-releasr-go@master
8856 env :
8957 # This is necessary in order to push a commit to the repo
9058 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
91-
92- - name : Create Release
93- id : create_release
94- uses : actions/create-release@v1
95- env :
96- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
97- with :
98- tag_name : ${{ steps.bump_version.outputs.release_version }}
99- release_name : Release ${{ steps.bump_version.outputs.release_version }}
100- draft : false
101- prerelease : false
102- - name : Upload Release Asset
103- id : upload-release-asset
104- uses : actions/upload-release-asset@v1
59+ - name : Publish Release
60+ id : publish
61+ uses : packagrio/action-publishr-go@master
10562 env :
106- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107- with :
108- upload_url : ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
109- asset_path : ${{ env.PROJECT_PATH }}/packagr-releasr-linux-amd64
110- asset_name : packagr-releasr-linux-amd64
111- asset_content_type : application/octet-stream
112- - name : Upload Release Asset
113- id : upload-release-asset-darwin
114- uses : actions/upload-release-asset@v1
115- env :
116- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
63+ # This is necessary in order to push a commit to the repo
64+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged
11765 with :
118- upload_url : ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
119- asset_path : ${{ env.PROJECT_PATH }}/packagr-releasr-darwin-amd64
120- asset_name : packagr-releasr-darwin-amd64
121- asset_content_type : application/octet-stream
66+ upload_assets : ' packagr-releasr-linux-amd64'
0 commit comments