Skip to content

Commit

Permalink
Use repo name as artifact name to be more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
stylesuxx committed May 1, 2022
1 parent b969509 commit efafae8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
- name: Make artifact name
id: make_artifactname
run: |
ARTIFACT_NAME="${{ github.repository }}-${{ github.run_number }}"
echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
ARTIFACT_NAME="${{ env.REPOSITORY_NAME }}-${{ github.run_number }}"
echo "${ARTIFACT_NAME}"
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Example IPK builder and Release workflow
This repo is meant as an example regarding workflows and IPK's.
This repo is meant as an example regarding workflows and IPKs.

The `Makefile` is used to build an IPK from the available data. The workflow file is meant to create a new release as soon as a new tag is pushed to the repository. It will thus trigger building the IPK and attaching it to the release.
The `Makefile` is used to build an IPK from the available `control` and `data` directories. The `automation.yml` workflow file is meant to create a new release as soon as a new tag is pushed to the repository.

> It will thus trigger building the IPK, create a release and attaching the IPK to itt.
## Workflow
Check [automation.yml](./.github/workflows/automation.yml) this file should be pretty self explanatory, there are two jobs: **build** and **release**.

Both jobs run when something is pushed to master and when new tags are pushed. The **build** job runs the `Makefile` and creates the artifact. The release file fetches the artifact and makes a new release, attaching all available IPK files as assets to the new release.
Both jobs run when something is pushed to master and when new tags are pushed. The **release** job `needs` the **build** job, so it runs first.

It basically runs the `Makefile` and creates the artifact. The release job fetches the artifact and generates a new release, attaching all available IPK files as assets to the new release.

When pushed to master the release will be marked as **pre-release**, only when a new tag is pushed it is marked as a full release.
## Tagging
When pushed to master the release will be marked as **pre-release**, only when a new tag is pushed it is marked as a full release, the tag name will then also be the releases name.

0 comments on commit efafae8

Please sign in to comment.