Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbes7878 committed Nov 22, 2024
1 parent 45faa8e commit 523405e
Show file tree
Hide file tree
Showing 7 changed files with 97 additions and 25 deletions.
3 changes: 3 additions & 0 deletions .bluprintrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
}, {
"action": "remove",
"paths": [
".github/workflows/release.yaml",
".github/workflows/sveltekit.yaml",
".github/CODEOWNERS",
".github/COMMIT_ERROR_ISSUE_TEMPLATE.md",
".github/PULL_REQUEST_TEMPLATE.md",
"test/*",
"CHANGELOG.md",
"CONTRIBUTING.md",
"README.md",
"rngs-io.json"
Expand Down
17 changes: 9 additions & 8 deletions .github/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# # Customize to whatever interval you need:
# # https://crontab.guru/
# - cron: '35 * * * *'

#
# jobs:
# publish-page:
# name: Publish page
Expand All @@ -35,13 +35,14 @@
# # This line will notify a Teams channel everytime your project successfully publishes
# # GRAPHICS_SERVER_NOTIFY_TEAMS_CHANNEL: # Add a Teams webhook URL here
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v4
# - uses: actions/setup-node@v4
# with:
# node-version: '16.15.0'
# cache: 'yarn'
# node-version: 20
# cache: pnpm
# - run: git config user.name github-actions
# - run: git config user.email [email protected]
# - run: yarn install
# - run: yarn upload
# - run: yarn publish:publish
# - run: pnpm install
# - run: pnpm upload
# - run: pnpm publish:publish
52 changes: 52 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release

on:
push:
branches:
- main


concurrency: ${{github.repository}}-${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
pages: write
id-token: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- id: pnpm
name: Setup pnpm
uses: pnpm/action-setup@v4

- id: setup
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- id: install
name: Install dependencies
run: pnpm i


- id: changesets
name: Create release Pull Request or publish to npm
uses: changesets/action@v1
with:
version: pnpm changeset version
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41 changes: 30 additions & 11 deletions .github/workflows/sveltekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ permissions:
on:
push:
branches:
- master
- main
pull_request:
types: [opened, reopened]
jobs:
Expand All @@ -15,20 +15,39 @@ jobs:
env:
TESTING: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- id: checkout
name: Checkout Repo
uses: actions/checkout@v4
with:
node-version: '18'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Config git
fetch-depth: 0

- id: pnpm
name: Setup pnpm
uses: pnpm/action-setup@v4

- id: setup
name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- id: install
name: Install dependencies
run: pnpm i

- id: config-git
name: Config git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Run tests
run: npx mocha
- name: Create issue on fail
- id: test
name: Run tests
run: pnpm test

- id: report
name: Create issue on fail
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/svelte.styles.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"prefix": "scss",
"body": [
"<style lang=\"scss\">",
" @import \"@reuters-graphics/graphics-components/dist/scss/mixins\";",
" @use '@reuters-graphics/graphics-components/dist/scss/mixins' as mixins;",
"",
" $1",
"</style>"
Expand Down
4 changes: 2 additions & 2 deletions pages/embed-previewer/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
// @ts-ignore
// @ts-ignore Is OK
import pages from '@svelte-kit-pages';
import { Framer } from '@reuters-graphics/graphics-components';
import { base } from '$app/paths';
Expand All @@ -10,7 +10,7 @@
.map((path) => (/\/$/.test(path) ? path : path + '/'));
</script>

<Framer embeds="{embeds}" />
<Framer {embeds} />

<style global>
body {
Expand Down
3 changes: 0 additions & 3 deletions src/template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="%lang%">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand All @@ -11,11 +10,9 @@
<link href="https://www.reuters.com/pf/resources/images/reuters/favicon/tr_fvcn_kinesis_180x180_v2.png?d=227" rel="apple-touch-icon">
%sveltekit.head%
</head>

<body>
<div id='svelte-app'>
%sveltekit.body%
</div>
</body>

</html>

0 comments on commit 523405e

Please sign in to comment.