Skip to content

Commit

Permalink
Merge branch 'code-maintenance/github-actions-revamp'
Browse files Browse the repository at this point in the history
  • Loading branch information
b12f committed Jul 18, 2023
2 parents 4387ca5 + 02cd066 commit 655d069
Show file tree
Hide file tree
Showing 26 changed files with 12,297 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-cars-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/octicons': minor
---

Added Angular package
2 changes: 1 addition & 1 deletion .github/actions/build_node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "**************** Copying assets files to build directory ****************"
cp -R ../build/ .

echo "**************** Installing ****************"
npm install --legacy-peer-deps
npm ci

echo "**************** Building ****************"
npm run build
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI

on:
push:
branches:
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
run: yarn test

octicons_node:
name: 'npm:@primer/octicons'
name: 'npm:@openproject/octicons'
needs: build
runs-on: ubuntu-latest
defaults:
Expand All @@ -65,13 +66,13 @@ jobs:
- name: Test
run: yarn test

octicons_react:
name: 'npm:@primer/octicons-react'
octicons_angular:
name: 'npm:@openproject/octicons-angular'
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_react
working-directory: ./lib/octicons_angular
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Octicons Publish

on:
release:
types: [published]
workflow_dispatch:
name: Octicons Publish

jobs:
setup:
runs-on: ubuntu-latest
Expand All @@ -11,7 +13,7 @@ jobs:
- uses: actions/setup-node@master
with:
node-version: '18.x'
- run: npm install
- run: npm ci
- run: npm run build
- run: cp -r icons lib/build/svg
- uses: actions/upload-artifact@master
Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
RUBYGEMS_TOKEN: ${{ secrets.RUBYGEMS_TOKEN }}
with:
args: octicons_helper
node:
angular:
runs-on: ubuntu-latest
needs: setup
steps:
Expand All @@ -68,4 +70,4 @@ jobs:
env:
NPM_AUTH_TOKEN_SHARED: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
with:
args: octicons_node
args: octicons_angular
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Release

on:
push:
branches:
- 'main'
- 'next_major'

jobs:
release:
name: Final
Expand Down Expand Up @@ -35,7 +37,7 @@ jobs:
- name: Create release pull request or publish to npm
id: changesets
uses: changesets/action@master
uses: changesets/action@v1
with:
title: Release Tracking
version: yarn changeset:version
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ public

# Now
.now

# generated stuff
__generated__
66 changes: 66 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "openproject octicon flake";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

inputs.devshell.url = "github:numtide/devshell";
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
inputs.devshell.inputs.systems.follows = "systems";

outputs = {self, nixpkgs, systems, devshell }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
# Nixpkgs instantiated for system types in nix-systems
nixpkgsFor = eachSystem (system:
import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
];
}
);
in
{
devShells = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.devshell.mkShell {
# Add additional packages you'd like to be available in your devshell PATH here
devshell.packages = with pkgs; [
gh
act
];

};
});

packages = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
});
};
}
16 changes: 16 additions & 0 deletions lib/octicons_angular/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions lib/octicons_angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db
27 changes: 27 additions & 0 deletions lib/octicons_angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# OcticonsAngular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.4.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
40 changes: 40 additions & 0 deletions lib/octicons_angular/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"octicons_angular": {
"projectType": "library",
"root": ".",
"sourceRoot": "src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "tsconfig.spec.json",
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions lib/octicons_angular/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"dest": "./dist/octicons-angular",
"lib": {
"entryFile": "src/public-api.ts"
}
}
Loading

0 comments on commit 655d069

Please sign in to comment.