Skip to content

Commit

Permalink
Merge pull request #10 from zazuko/changesets
Browse files Browse the repository at this point in the history
Configure Changesets
  • Loading branch information
ludovicm67 authored Jul 11, 2023
2 parents 6f748cb + c07c73c commit f3d4f9c
Show file tree
Hide file tree
Showing 15 changed files with 2,017 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"privatePackages": {
"tag": true,
"version": true
},
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/old-rivers-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuseki-geosparql": minor
---

Upgrade Apache Jena to 4.9.0
5 changes: 5 additions & 0 deletions .changeset/violet-tools-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuseki-geosparql": patch
---

Improve the release process
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ docs/
.github/
Dockerfile
.dockerignore
tests
tests/
node_modules/
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ludovicm67
25 changes: 13 additions & 12 deletions .github/workflows/ci.yaml → .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ name: Build and push Docker image

on:
push:
branches:
- "**"
tags:
- "v*.*.*"

jobs:
docker:
runs-on: ubuntu-latest

env:
DOCKER_IMAGE: ghcr.io/zazuko/fuseki-geosparql

steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,12 +22,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install hurl
uses: gacts/install-hurl@v1

- name: Run tests
run: cd tests && ./run.sh && cd -

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
Expand All @@ -35,12 +30,18 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
uses: zazuko/action-docker-meta@main
id: docker_meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/zazuko/fuseki-geosparql

- name: Build and push Docker images
images: "${{ env.DOCKER_IMAGE }}"
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push Docker image
id: docker_build
uses: docker/build-push-action@v4
with:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main

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

jobs:
release:
name: Release

runs-on: ubuntu-latest

steps:
# This allow GitHub Actions to trigger the jobs for tags if needed
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.GH_APP_ID }}
private_key: ${{ secrets.GH_PRIVATE_KEY }}

- name: Checkout Repo
uses: actions/checkout@v3
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: yarn

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
commit: "chore: release"
title: "Merge to release"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
23 changes: 23 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run tests

on:
push:
branches:
- "**"

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Install hurl
uses: gacts/install-hurl@v1

- name: Run tests
run: cd tests && ./run.sh && cd -
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG OTEL_JAR
WORKDIR /build

# install some dependencies
RUN apt update && apt install -y \
RUN apt-get update && apt-get install -y \
patch \
unzip \
wget
Expand Down
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "fuseki-geosparql",
"version": "2.2.0",
"description": "Non-offcial Fuseki Docker image with GeoSPARQL support",
"main": "index.js",
"repository": "[email protected]:zazuko/fuseki-geosparql.git",
"author": "Zazuko GmbH",
"license": "MIT",
"private": true,
"scripts": {
"release": "changeset tag"
},
"devDependencies": {
"@changesets/cli": "^2.26.2"
}
}
2 changes: 2 additions & 0 deletions tests/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: "3"

services:
fuseki-default:
image: ghcr.io/zazuko/fuseki-geosparql
build:
context: ../
dockerfile: Dockerfile
Expand All @@ -11,6 +12,7 @@ services:
- ADMIN_PASSWORD=secret

fuseki-geosparql:
image: ghcr.io/zazuko/fuseki-geosparql
build:
context: ../
dockerfile: Dockerfile
Expand Down
2 changes: 2 additions & 0 deletions tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

set -eu

docker-compose pull
DOCKER_BUILDKIT=1 docker-compose build
DOCKER_BUILDKIT=1 docker-compose up -d
echo "Waiting 20 seconds…"
sleep 20
hurl --test *.hurl
docker-compose down
Loading

0 comments on commit f3d4f9c

Please sign in to comment.