diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7e3b2dd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Build + run: | + npm install + npm run build + - + name: Import GPG key + uses: ./ + env: + SIGNING_KEY: ${{ secrets.SIGNING_KEY_TEST }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 0000000..5c67dac --- /dev/null +++ b/.github/workflows/master.yml @@ -0,0 +1,40 @@ +name: master + +on: + push: + branches: + - master + +jobs: + prune: + runs-on: ubuntu-latest + steps: + - + # https://github.com/actions/checkout + name: Checkout + uses: actions/checkout@v2 + - + # https://github.com/actions/checkout/issues/6 + name: Fix detached HEAD + run: git checkout ${GITHUB_REF#refs/heads/} + - + name: Build + run: | + npm install + npm run build + - + name: Set up Git + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + - + name: Commit and push changes + run: | + git add . + if output=$(git status --porcelain) && [ ! -z "$output" ]; then + git commit -m 'Update generated content' + git push + fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1796f42 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: test + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + steps: + - + # https://github.com/actions/checkout + name: Checkout + uses: actions/checkout@v2 + - + name: Install + run: npm ci + - + name: Build + run: npm run build + - + name: Test + run: npm run test