Comments (4)
Uhm I got you, my bad!
I will add wildcard support in the next release.
As per artifacts download, it sure looks like a good addition that should be implemented.
I think the following pattern might work:
- name: Release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRAFT_RELEASE: "false"
PRE_RELEASE: "false"
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_EMPTY_CHANGELOG: "false"
ALLOW_TAG_PREFIX: "true"
with:
args: | # <artifact-name>:<filename-pattern>
job1:release/app.exe # single file from artifact
job2:build/*.dll # wildcard matching in an artifact
job3:* # every file from an artifact
LICENSE.md # file from current workspace
*.jpg # wildcard matching in current workspace
from git-release.
I understand your point, and to be honest, I think its kind of a common need to collect artifacts from different parallel stages.
I believe that each action should take care of a certain task, and only that small task in order to be simple, generic, and reliable.
That matrix that you are describing looks like a usecase for another Action to be made 🙂 an alternative to actions/download-artifact 😉
That artifact preparing action has enough to take care of like filename collisions, multiple artifacts download, moving files around and preparing a file tree, maybe even creating archives and cleaning the GitHub Artifacts in order to lower the Packages billing, and more...
Moreover, independent action will also simplify the matrix definition as it will have clean args
and env
that may be used for that.
from git-release.
I think you've misunderstood my request because I can't make heads nor tails of your response. 😅
My problem isn't with assembling the artifact(s), that's well taken care of and I give it for background.
The issue is that I can't tell git-release
to use any artifact I've assembled.
Note that wildcards like args: "my-asset_*_.tar.gz
also doesn't work. That would be another alternative to consider, but the real goal here is to get rid of download-artifact
+hack.
from git-release.
Unfortunately, download artifacts seems to be problematic for implementation.
The reason for that is that artifacts are not available during a workflow run through API, but only after it finishes.
Going through a code of an official actions/download-artifact, I have noticed that it uses a different API and auth.
git-release may mimic this by crafting an API calls that will look similar to:
https://pipelines.actions.githubusercontent.com/<actions-token>/_apis/pipelines/workflows/<workflow-run>/artifacts?api-version=6.0-preview
But it will break without a notice ❗
Thus, we will have to rely on other steps to prepare the files for a release, with something like:
jobs:
job-1:
runs-on: ubuntu-latest
steps:
[...]
- uses: actions/upload-artifact@v2
with:
name: linux
path: build/linux-amd64
job-2:
runs-on: macos-latest
steps:
[...]
- uses: actions/upload-artifact@v2
with:
name: darwin
path: build/darwin-amd64
job-3:
runs-on: windows-latest
steps:
[...]
- uses: actions/upload-artifact@v2
with:
name: darwin
path: build/windows-amd64.exe
release:
needs: [job-1, job-2, job-3]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: linux
path: artifacts
- uses: actions/download-artifact@v2
with:
name: macos
path: artifacts
- uses: actions/download-artifact@v2
with:
name: windows
path: artifacts
- name: Release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG_FILE: none
ALLOW_EMPTY_CHANGELOG: "true"
ALLOW_TAG_PREFIX: "true"
with:
args: artifacts/build/*-amd64*
from git-release.
Related Issues (20)
- malformed env.var 'GITHUB_REF' (control tag prefix via env.var 'ALLOW_TAG_PREFIX'): expected to match regex HOT 2
- self-hosted runner issues HOT 3
- Add support for `amd64` HOT 1
- Publish `action` on GitHub Marketplace HOT 1
- GHE Support HOT 23
- Support a "Unreleased" pre-release HOT 3
- Development tags are not matched correctly HOT 1
- [QUESTION] How to do prerelease like on suffix? HOT 2
- How to restict folders and files for the Release? HOT 3
- CHANGELOG.md with empty Headings HOT 1
- Interpret CHANGELOG.md headlines with "v" HOT 1
- Support for GitLab? HOT 1
- Empty headlines in a release HOT 2
- Regression in v4.2+ HOT 8
- panic: runtime error: invalid memory address or nil pointer dereference HOT 6
- Upload error HOT 2
- Automate adding a footer to the release note HOT 1
- SIGSEGV on v5 when no changes for a version (Unreleased) HOT 1
- add in documenation: UNRELEASED and DRAFT_RELEASE do not work together HOT 3
- Isn't the default release name the tag?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-release.