GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - widoz/github-artifacts-action: A GitHub action to build the assets of a project

BranchesTags
Open more actions menu

Latest commit

 

History

59 Commits
59 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.husky
.husky
 
 
.vscode
.vscode
 
 
dist
dist
 
 
src
src
 
 
tests
tests
 
 
.editorconfig
.editorconfig
 
 
.eslintignore
.eslintignore
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.prettierignore
.prettierignore
 
 
.prettierrc
.prettierrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
action.yml
action.yml
 
 
index.ts
index.ts
 
 
jest.config.ts
jest.config.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

Assets Artifacts Action

A GitHub Action to upload artifacts to a release

JS Quality Assurance codecov CodeRabbit Pull Request Reviews

Assets Artifacts is designed to compile the assets of your project and commit and push these assets back into the repository. It also moves the tags to point to the commit where the assets are pushed.

What it does

  1. Compiles the assets: The action runs the yarn build command to compile the assets of your project.

  2. Commits and pushes the assets: After the compilation is completed, the action commits the changes and pushes the assets back into the repository.

  3. Moves the tags: The action moves the tags to point to the commit where the assets are pushed.

Configuration

  • command Pass the command the action has to use to build the artifacts. Default to yarn build.
  • target-dir Pass the director where the action has to store the artifacts. Default to build.
  • can-push Pass the boolean indicating if the assets can be pushed or not. Default to true.

Workflow Example

Here is an example of how to use this action in a workflow:

name: Build Artifacts

on:
  push:
    tags:
      - '*'
    branches:
      - main
      - master
      - develop
      - release/*
      - feature/*
      - hotfix/*

jobs:
  build:
    runs-on: ubuntu-latest
    if: ${{ !contains(github.event.head_commit.message, '--skip-assets-artifacts') }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Setup Node
        uses: actions/setup-node@v2
        with:
          cache: 'yarn'
          node-version: '20'

      - name: Install Dependencies
        run: yarn install

      - name: Build Artifacts
        uses: widoz/github-artifacts-action@v1
        env:
          GIT_USER: ${{ secrets.GIT_USER }}
          GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
          HUSKY: 0
        with:
          command: 'npm run build'
          target-dir: './dist'
          can-push: 'false'

In this workflow, the action is triggered on every push event that includes a tag. The workflow runs on the latest version of Ubuntu and will not run if the commit message contains --skip-assets-artifacts.

The workflow includes steps to check out the repository, setup Node.js with a specified version and cache configuration, install dependencies using yarn install, and finally, build the artifacts using the widoz/github-artifacts-action@v1 action.

The GIT_USER and GIT_EMAIL environment variables are used for the commit and should be stored as secrets in your GitHub repository. The HUSKY environment variable is set to 0 to disable Husky during the action run.

License

This project is licensed under the GNU General Public License - see the LICENSE file for details.

About

A GitHub action to build the assets of a project

Resources

Readme
GPL-2.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.