From c86a86a2e7e07578f1f69b77177e75831a97fcd0 Mon Sep 17 00:00:00 2001 From: James Hegedus Date: Thu, 9 Mar 2023 13:09:13 +0000 Subject: [PATCH] Revert "ci: automate releases with release-please (#519)Co-authored-by: jthegedus <41898282+github-actions[bot]@users.noreply.github.com>" This reverts commit fc3e48b8a56811dadea421849823eee7d808a083. --- .github/workflows/build.yml | 52 -------- .github/workflows/codeql.yml | 2 +- .github/workflows/lint.yaml | 64 ---------- .github/workflows/release.yaml | 33 ----- .github/workflows/semantic-pr.yaml | 18 --- .github/workflows/test.yml | 98 --------------- .github/workflows/workflow.yml | 186 +++++++++++++++++++++++++++++ .tool-versions | 3 +- CHANGELOG.md | 4 + package.json | 2 +- 10 files changed, 193 insertions(+), 269 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/lint.yaml delete mode 100644 .github/workflows/release.yaml delete mode 100644 .github/workflows/semantic-pr.yaml delete mode 100644 .github/workflows/test.yml create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index cbdfb10..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: build - -on: - push: - branches: - - master - pull_request: - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: - - macos-latest - - ubuntu-latest - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Use Node.js 16.x - uses: actions/setup-node@v3 - with: - node-version: 16.x - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" - - name: Retrieve yarn cache - uses: actions/cache@v3 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: v1-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - restore-keys: | - v1-${{ runner.os }}-yarn- - - - name: Install npm packages - run: yarn --frozen-lockfile - - - name: Ensure out directories are up-to-date - if: runner.os == 'Linux' - shell: bash - run: | - yarn build - if [ "$(git status --porcelain | wc -l)" -gt "0" ]; then - echo "Detected uncommitted changes after build. See status below:" - git diff - exit 1 - fi diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b2ef62f..a9039e5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,4 +1,4 @@ -name: codeql +name: CodeQL on: - pull_request diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index de1a11f..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: lint - -on: - push: - branches: - - master - pull_request: - -jobs: - eslint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" - - name: Install npm packages - run: yarn --frozen-lockfile - - name: Check lint - run: yarn lint - - prettier: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" - - name: Install npm packages - run: yarn --frozen-lockfile - - name: Check formatting - run: yarn fmt:check - - typecheck: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16.x - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> "$GITHUB_OUTPUT" - - name: Install npm packages - run: yarn --frozen-lockfile - - name: Check types - run: yarn typecheck - - actionlint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Check workflow files - uses: docker://rhysd/actionlint:1.6.23 - with: - args: -color diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index 3cafbcf..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: release - -on: - push: - branches: - - master - -permissions: - contents: write - pull-requests: write - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: google-github-actions/release-please-action@v3 - id: release - with: - release-type: node - command: github-release - # extra-files: | - # README.md - - uses: actions/checkout@v2 - - name: tag major versions - if: ${{ steps.release.outputs.release_created }} - run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" - git tag -d v${{ steps.release.outputs.major }} || true - git push origin :v${{ steps.release.outputs.major }} || true - git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" - git push origin v${{ steps.release.outputs.major }} diff --git a/.github/workflows/semantic-pr.yaml b/.github/workflows/semantic-pr.yaml deleted file mode 100644 index c135265..0000000 --- a/.github/workflows/semantic-pr.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: lint - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -jobs: - semantic-pr: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5.1.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - validateSingleCommit: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d3841c1..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: test - -on: - push: - branches: - - master - pull_request: - -jobs: - asdf_is_installed: - strategy: - fail-fast: false - matrix: - os: ["macos-latest", "ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: setup asdf - uses: ./setup - - name: asdf is available - run: | - echo ASDF_DIR="${ASDF_DIR}" - echo ASDF_DATA_DIR="${ASDF_DATA_DIR}" - echo PATH="${PATH}" - asdf --version - - plugin_is_tested: - strategy: - fail-fast: false - matrix: - os: ["macos-latest", "ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: ./plugin-test - with: - command: direnv --version - plugin: direnv - giturl: https://github.com/asdf-community/asdf-direnv.git - gitref: master - - plugins_are_installed: - strategy: - fail-fast: false - matrix: - os: ["macos-latest", "ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: ./plugins-add - with: - tool_versions: | - # tools won't be installed by this action, only plugins - elixir foo - nodejs bar - - run: | - asdf plugin list --urls --refs | grep elixir - asdf plugin list --urls --refs | grep nodejs - - installing-plugins-already-installed-are-skiped: - strategy: - fail-fast: false - matrix: - os: ["macos-latest", "ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - uses: ./setup - - name: Add an asdf plugin - run: | - asdf plugin-add clusterctl https://github.com/pfnet-research/asdf-clusterctl.git - - uses: ./plugins-add - with: - tool_versions: | - # tools won't be installed by this action, only plugins - elixir foo - nodejs bar - # plugins already installed are here - clusterctl tako - - run: | - asdf plugin list --urls --refs | grep elixir - asdf plugin list --urls --refs | grep nodejs - asdf plugin list --urls --refs | grep clusterctl - - tools_are_installed: - strategy: - fail-fast: false - matrix: - os: ["macos-latest", "ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: setup asdf - uses: ./install - with: - before_install: echo asdf nodejs import-keyring - tool_versions: direnv 2.32.1 - - run: direnv version diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..13c3103 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,186 @@ +name: Main workflow + +on: + - pull_request + - push + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16.x + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Retrieve yarn cache + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: v1-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + v1-${{ runner.os }}-yarn- + + - name: Install npm packages + run: yarn --frozen-lockfile + + - name: Check formatting + run: yarn fmt:check + + - name: Check lint + run: yarn lint + + - name: Check type + run: yarn typecheck + + - name: Ensure out directories are up-to-date + if: runner.os == 'Linux' + shell: bash + run: | + yarn build + if [ "$(git status --porcelain | wc -l)" -gt "0" ]; then + echo "Detected uncommitted changes after build. See status below:" + git diff + exit 1 + fi + + asdf_is_installed: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: setup asdf + uses: ./setup + + - name: asdf is available + run: | + echo ASDF_DIR=$ASDF_DIR + echo ASDF_DATA_DIR=$ASDF_DATA_DIR + echo PATH=$PATH + asdf --version + + plugin_is_tested: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - uses: ./plugin-test + with: + command: direnv --version + plugin: direnv + giturl: https://github.com/asdf-community/asdf-direnv.git + gitref: master + + plugins_are_installed: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - uses: ./plugins-add + with: + tool_versions: | + # tools won't be installed by this action, only plugins + elixir foo + nodejs bar + + - run: | + asdf plugin list --urls --refs | grep elixir + asdf plugin list --urls --refs | grep nodejs + + installing-plugins-already-installed-are-skiped: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - uses: ./setup + + - name: Add an asdf plugin + run: | + asdf plugin-add clusterctl https://github.com/pfnet-research/asdf-clusterctl.git + + - uses: ./plugins-add + with: + tool_versions: | + # tools won't be installed by this action, only plugins + elixir foo + nodejs bar + # plugins already installed are here + clusterctl tako + + - run: | + asdf plugin list --urls --refs | grep elixir + asdf plugin list --urls --refs | grep nodejs + asdf plugin list --urls --refs | grep clusterctl + + tools_are_installed: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: setup asdf + uses: ./install + with: + before_install: echo asdf nodejs import-keyring + tool_versions: direnv 2.32.1 + + - run: direnv version diff --git a/.tool-versions b/.tool-versions index 01dd94a..ffd2870 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1 @@ -nodejs 16.19.1 -yarn 1.22.19 +nodejs 16.18.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fa419b..f2e5e04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). + ## [1.1.0] - 2020-12-22 ### Added diff --git a/package.json b/package.json index 596d374..c8d37df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asdf-vm/actions", - "version": "1.1.0", + "version": "1.0.1", "description": "asdf github actions", "repository": "https://github.com/asdf-vm/actions", "author": "Victor Borja ",