GeezerVison is showing github.com — Merge remote-tracking branch 'origin/master' into flarco/master · goreleaser/goreleaser-action@66134d9
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/ci.yml +4-26Lines changed: 4 additions & 26 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 57 | 57 | with: | 58 | 58 | distribution: ${{ matrix.distribution }} | 59 | 59 | version: ${{ matrix.version }} | 60 | | - args: release --skip-publish --rm-dist | | 60 | + args: release --skip-publish --rm-dist --snapshot | 61 | 61 | workdir: ./test | 62 | 62 |
| 63 | 63 | install-only: | @@ -138,7 +138,7 @@ jobs: | 138 | 138 | uses: ./ | 139 | 139 | with: | 140 | 140 | version: latest | 141 | | - args: -f .goreleaser-signing.yml release --skip-publish --rm-dist | | 141 | + args: -f .goreleaser-signing.yml release --skip-publish --rm-dist --snapshot | 142 | 142 | workdir: ./test | 143 | 143 | env: | 144 | 144 | GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | @@ -166,7 +166,7 @@ jobs: | 166 | 166 | name: GoReleaser | 167 | 167 | uses: ./ | 168 | 168 | with: | 169 | | - args: release --skip-publish --rm-dist | | 169 | + args: release --skip-publish --rm-dist --snapshot | 170 | 170 | workdir: ./test | 171 | 171 | - | 172 | 172 | name: Upload assets | @@ -175,28 +175,6 @@ jobs: | 175 | 175 | name: myapp | 176 | 176 | path: ./test/dist/* | 177 | 177 |
| 178 | | - current-tag: | 179 | | - runs-on: ubuntu-latest | 180 | | - steps: | 181 | | - - | 182 | | - name: Checkout | 183 | | - uses: actions/checkout@v3 | 184 | | - with: | 185 | | - fetch-depth: 0 | 186 | | - - | 187 | | - name: Set up Go | 188 | | - uses: actions/setup-go@v3 | 189 | | - with: | 190 | | - go-version: 1.18 | 191 | | - - | 192 | | - name: GoReleaser | 193 | | - uses: ./ | 194 | | - with: | 195 | | - args: release --skip-publish --rm-dist | 196 | | - workdir: ./test | 197 | | - env: | 198 | | - GORELEASER_CURRENT_TAG: v99.99.99 | 199 | | - | 200 | 178 | dist: | 201 | 179 | runs-on: ubuntu-latest | 202 | 180 | steps: | @@ -214,7 +192,7 @@ jobs: | 214 | 192 | name: GoReleaser | 215 | 193 | uses: ./ | 216 | 194 | with: | 217 | | - args: release --config .goreleaser-dist.yml --skip-publish --rm-dist | | 195 | + args: release --config .goreleaser-dist.yml --skip-publish --rm-dist --snapshot | 218 | 196 | workdir: ./test | 219 | 197 | - | 220 | 198 | name: Check dist | |
Collapse file Copy file name to clipboardExpand all lines: README.md +2-1Lines changed: 2 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -138,14 +138,15 @@ purpose. You can do that with the [actions/upload-artifact](https://github.com/a | 138 | 138 | with: | 139 | 139 | version: latest | 140 | 140 | args: release --rm-dist | | 141 | + workdir: myfolder | 141 | 142 | env: | 142 | 143 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | 143 | 144 | - | 144 | 145 | name: Upload assets | 145 | 146 | uses: actions/upload-artifact@v3 | 146 | 147 | with: | 147 | 148 | name: myapp | 148 | | - path: dist/* | | 149 | + path: myfolder/dist/* | 149 | 150 | ``` | 150 | 151 |
| 151 | 152 | ### Install Only | |
Collapse file Copy file name to clipboardExpand all lines: __tests__/git.test.ts -31Lines changed: 0 additions & 31 deletions Collapse file Copy file name to clipboardExpand all lines: dist/index.js +1-1Lines changed: 1 addition & 1 deletion Collapse file Copy file name to clipboardExpand all lines: dist/index.js.map +1-1Lines changed: 1 addition & 1 deletion Collapse file Copy file name to clipboardExpand all lines: package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 26 | 26 | "@actions/http-client": "^2.0.1", | 27 | 27 | "@actions/tool-cache": "^2.0.1", | 28 | 28 | "js-yaml": "^4.1.0", | 29 | | - "yargs": "^17.6.0" | | 29 | + "yargs": "^17.6.2" | 30 | 30 | }, | 31 | 31 | "devDependencies": { | 32 | 32 | "@types/node": "^16.11.26", | |
Collapse file Copy file name to clipboardExpand all lines: src/git.ts -49Lines changed: 0 additions & 49 deletions Collapse file Copy file name to clipboardExpand all lines: src/goreleaser.ts +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,8 +28,8 @@ export async function install(distribution: string, version: string): Promise<st | 28 | 28 | core.info('Extracting GoReleaser'); | 29 | 29 | let extPath: string; | 30 | 30 | if (context.osPlat == 'win32') { | 31 | | - if(!downloadPath.endsWith('.zip')) { | 32 | | - let newPath = downloadPath + '.zip'; | | 31 | + if (!downloadPath.endsWith('.zip')) { | | 32 | + const newPath = downloadPath + '.zip'; | 33 | 33 | fs.renameSync(downloadPath, newPath); | 34 | 34 | extPath = await tc.extractZip(newPath); | 35 | 35 | } else { | |
Collapse file Copy file name to clipboardExpand all lines: src/main.ts +1-24Lines changed: 1 addition & 24 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,6 @@ import * as fs from 'fs'; | 2 | 2 | import * as path from 'path'; | 3 | 3 | import yargs from 'yargs'; | 4 | 4 | import * as context from './context'; | 5 | | -import * as git from './git'; | 6 | 5 | import * as goreleaser from './goreleaser'; | 7 | 6 | import * as core from '@actions/core'; | 8 | 7 | import * as exec from '@actions/exec'; | @@ -28,10 +27,6 @@ async function run(): Promise<void> { | 28 | 27 | process.chdir(inputs.workdir); | 29 | 28 | } | 30 | 29 |
| 31 | | - const commit = await git.getShortCommit(); | 32 | | - const tag = await git.getTag(); | 33 | | - const isTagDirty = await git.isTagDirty(tag); | 34 | | - | 35 | 30 | let yamlfile: string | unknown; | 36 | 31 | const argv = yargs.parse(inputs.args); | 37 | 32 | if (argv.config) { | @@ -44,25 +39,7 @@ async function run(): Promise<void> { | 44 | 39 | }); | 45 | 40 | } | 46 | 41 |
| 47 | | - let snapshot = ''; | 48 | | - if (inputs.args.split(' ').indexOf('release') > -1) { | 49 | | - if (isTagDirty) { | 50 | | - if (!inputs.args.includes('--snapshot') && !inputs.args.includes('--nightly')) { | 51 | | - core.info(`No tag found for commit ${commit}. Snapshot forced`); | 52 | | - snapshot = ' --snapshot'; | 53 | | - } | 54 | | - } else { | 55 | | - core.info(`${tag} tag found for commit ${commit}`); | 56 | | - } | 57 | | - } | 58 | | - | 59 | | - await exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, { | 60 | | - env: Object.assign({}, process.env, { | 61 | | - GORELEASER_CURRENT_TAG: process.env.GORELEASER_CURRENT_TAG || tag || '' | 62 | | - }) as { | 63 | | - [key: string]: string; | 64 | | - } | 65 | | - }); | | 42 | + await exec.exec(`${bin} ${inputs.args}`); | 66 | 43 |
| 67 | 44 | if (typeof yamlfile === 'string') { | 68 | 45 | const artifacts = await goreleaser.getArtifacts(await goreleaser.getDistPath(yamlfile)); | |
Collapse file Copy file name to clipboardExpand all lines: yarn.lock +9-9Lines changed: 9 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3558 | 3558 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" | 3559 | 3559 | integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== | 3560 | 3560 |
| 3561 | | -yargs-parser@^21.0.0: | 3562 | | - version "21.0.1" | 3563 | | - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35" | 3564 | | - integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg== | | 3561 | +yargs-parser@^21.1.1: | | 3562 | + version "21.1.1" | | 3563 | + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" | | 3564 | + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== | 3565 | 3565 |
| 3566 | 3566 | yargs@^16.2.0: | 3567 | 3567 | version "16.2.0" | @@ -3576,18 +3576,18 @@ yargs@^16.2.0: | 3576 | 3576 | y18n "^5.0.5" | 3577 | 3577 | yargs-parser "^20.2.2" | 3578 | 3578 |
| 3579 | | -yargs@^17.6.0: | 3580 | | - version "17.6.0" | 3581 | | - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.0.tgz#e134900fc1f218bc230192bdec06a0a5f973e46c" | 3582 | | - integrity sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g== | | 3579 | +yargs@^17.6.2: | | 3580 | + version "17.6.2" | | 3581 | + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.6.2.tgz#2e23f2944e976339a1ee00f18c77fedee8332541" | | 3582 | + integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== | 3583 | 3583 | dependencies: | 3584 | 3584 | cliui "^8.0.1" | 3585 | 3585 | escalade "^3.1.1" | 3586 | 3586 | get-caller-file "^2.0.5" | 3587 | 3587 | require-directory "^2.1.1" | 3588 | 3588 | string-width "^4.2.3" | 3589 | 3589 | y18n "^5.0.5" | 3590 | | - yargs-parser "^21.0.0" | | 3590 | + yargs-parser "^21.1.1" | 3591 | 3591 |
| 3592 | 3592 | | 3593 | 3593 | version "3.1.1" | |
|