-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md * publish node package * publish node package * Update release.yml * Update release.yml * Update release.yml * Update release.yml * release.yml * release.yml * release.yml * setup node package * yarn setup node package * fix scope * try npm publish * print npmrc * try moving npmrc * try moving npmrc * try moving npmrc * try moving npmrc * try no private * dont move npmrc * set version with jq * set version with jq * remove duplicate * use tag as version * use tag as version * use tag as version * Update README.md * Update README.md * Update release.yml * add missing { Co-Authored-By: Marcelo Luiz Onhate <[email protected]> * fix typos Co-authored-by: Marcelo Luiz Onhate <[email protected]>
- Loading branch information
1 parent
3605d9c
commit 4767bbe
Showing
2 changed files
with
53 additions
and
19 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 |
---|---|---|
|
@@ -26,8 +26,9 @@ jobs: | |
- name: Build project | ||
run: | | ||
go build | ||
mkdir out | ||
go build -o ./out/terratag/terratag | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
|
@@ -38,14 +39,33 @@ jobs: | |
release_name: Terratag ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
|
||
# Setup .npmrc file to publish to GitHub Packages | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
scope: '@env0' | ||
|
||
- run: | | ||
npm init --yes --scope @env0 | ||
ref=${{ github.ref }} | ||
tag=\"${ref#"refs/tags/v"}\" | ||
echo "`jq .version="${tag}" package.json`" > package.json | ||
working-directory: ./out/terratag | ||
# Need to get version from release | ||
- run: npm publish ./out/terratag | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
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 | ||
asset_path: ./terratag | ||
asset_path: ./out/terratag/terratag | ||
asset_name: terratag-linux | ||
asset_content_type: application/zip |
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