-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a0085b0
Showing
8 changed files
with
439 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Publish GitHub Actions | ||
|
||
on: | ||
push: | ||
tags: | ||
- v?[0-9]+.[0-9]+.[0-9]+-?** | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Determine versions | ||
id: versions | ||
run: | | ||
echo "major-version=v$(cat VERSION)" >> "$GITHUB_OUTPUT" | ||
- name: Debug versions | ||
run: | | ||
echo "${{steps.versions.outputs.major-version}}" | ||
- run: git tag -f "${{ steps.versions.outputs.major-version }}" | ||
if: ${{ ! contains(steps.versions.outputs.full-version,'-') }} | ||
- run: git push -f origin "${{ steps.versions.outputs.major-version }}" | ||
if: ${{ ! contains(steps.versions.outputs.full-version,'-') }} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Test Brioche Setup | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
setup-brioche: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Brioche | ||
uses: brioche-dev/setup-brioche@v1 | ||
with: | ||
version: 'v0.1.3' # Optional, defaults to v0.1.3 | ||
|
||
- name: Verify Brioche installation | ||
run: brioche --version # Verifies that Brioche is available in the PATH |
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 |
---|---|---|
@@ -0,0 +1,180 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/node,zsh | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=node,zsh | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Node Patch ### | ||
# Serverless Webpack directories | ||
.webpack/ | ||
|
||
# Optional stylelint cache | ||
|
||
# SvelteKit build / generate output | ||
.svelte-kit | ||
|
||
### Zsh ### | ||
# Zsh compiled script + zrecompile backup | ||
*.zwc | ||
*.zwc.old | ||
|
||
# Zsh completion-optimization dumpfile | ||
*zcompdump* | ||
|
||
# Zsh history | ||
.zsh_history | ||
|
||
# Zsh sessions | ||
.zsh_sessions | ||
|
||
# Zsh zcalc history | ||
.zcalc_history | ||
|
||
# A popular plugin manager's files | ||
._zinit | ||
.zinit_lstupd | ||
|
||
# zdharma/zshelldoc tool's files | ||
zsdoc/data | ||
|
||
# robbyrussell/oh-my-zsh/plugins/per-directory-history plugin's files | ||
# (when set-up to store the history in the local directory) | ||
.directory_history | ||
|
||
# MichaelAquilina/zsh-autoswitch-virtualenv plugin's files | ||
# (for Zsh plugins using Python) | ||
.venv | ||
|
||
# Zunit tests' output | ||
/tests/_output/* | ||
!/tests/_output/.gitkeep | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/node,zsh |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
MIT License | ||
|
||
Copyright (c) Kyle Lacy | ||
|
||
Copyright (c) Tangram, Inc. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# setup-brioche | ||
|
||
![GitHub release (latest by date)](https://img.shields.io/github/v/release/brioche-dev/setup-brioche) ![GitHub](https://img.shields.io/github/license/brioche-dev/setup-brioche) | ||
|
||
A GitHub Action to install [Brioche](https://brioche.dev/), a package manager designed for developers seeking efficient, streamlined software installation and dependency management. | ||
|
||
## Overview | ||
|
||
`setup-brioche` installs Brioche on GitHub-hosted or self-hosted runners, enabling your workflows to seamlessly use Brioche for managing packages and scripts. This Action sets up the environment quickly, ensuring that Brioche is ready for use in subsequent steps of your workflow. | ||
|
||
## Usage | ||
|
||
Add the `setup-brioche` Action to your workflow to install Brioche: | ||
|
||
```yaml | ||
jobs: | ||
setup-brioche: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Brioche | ||
uses: brioche-dev/setup-brioche@v1 | ||
with: | ||
version: 'v0.1.3' # Optional, specify a version or use the default (v0.1.3) | ||
install-dir: '/custom/install/path' # Optional, specify a custom installation path | ||
|
||
- name: Verify Brioche installation | ||
run: brioche --version # Check that Brioche is available | ||
``` | ||
## Inputs | ||
- `version`: (Optional) The version of Brioche to install. Defaults to `v0.1.3`. | ||
- `install-dir`: (Optional) The directory where Brioche should be installed. Defaults to `${{ github.home }}/.local/bin`. | ||
|
||
## How It Works | ||
|
||
This Action runs a shell script that: | ||
|
||
1. Downloads the specified version of Brioche based on the runner's OS and architecture. | ||
2. Verifies the integrity of the download using a SHA-256 checksum. | ||
3. Installs Brioche into the specified or default directory. | ||
4. Adds the install directory to the `PATH` for use in subsequent steps. | ||
|
||
### Example Workflow | ||
|
||
Here's a complete workflow example: | ||
|
||
```yaml | ||
name: CI with Brioche | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
- name: Setup Brioche | ||
uses: brioche-dev/setup-brioche@v1 | ||
with: | ||
version: 'v0.1.3' | ||
install-dir: '/custom/install/path' # Optional, specify if needed | ||
- name: Install Dependencies | ||
run: | | ||
brioche install my-package | ||
brioche update | ||
- name: Run Build Script | ||
run: ./build.sh | ||
``` | ||
|
||
## Logs and Debugging | ||
|
||
This Action uses GitHub's [logging groups](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines) to make output more readable. You will see collapsible log groups for stages like downloading, validating, and installing Brioche, making it easier to debug if needed. | ||
|
||
## Troubleshooting | ||
|
||
- Ensure the version specified in the `version` input is valid and available. | ||
- If Brioche isn't recognized in your shell, make sure the install path is correctly set in your environment. | ||
|
||
## License | ||
|
||
This project is licensed under the [MIT License](https://github.com/brioche-dev/setup-brioche/blob/main/LICENSE). | ||
|
||
## Support and Contact | ||
|
||
For issues, feature requests, or questions, please open an issue in this repository or visit the [Brioche GitHub page](https://github.com/brioche-dev/brioche). |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.0 |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Setup Brioche' | ||
description: 'GitHub Action to install Brioche on a runner' | ||
author: 'brioche-dev' | ||
inputs: | ||
version: | ||
description: 'Version of Brioche to install' | ||
required: false | ||
default: 'v0.1.3' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Brioche | ||
shell: bash | ||
run: | | ||
chmod +x $GITHUB_ACTION_PATH/install-brioche.sh | ||
$GITHUB_ACTION_PATH/install-brioche.sh ${{ inputs.version }} | ||
- name: Add Brioche to PATH | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH |
Oops, something went wrong.