Skip to content

Commit

Permalink
fix(dist_url): The distributive URL was fixed (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam authored Sep 25, 2023
1 parent bd0e370 commit 54fa5cc
Show file tree
Hide file tree
Showing 12 changed files with 8,907 additions and 3,113 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:

jobs:
update-git-tag: # Reason: <https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations>
name: Update latest major git tag
runs-on: ubuntu-20.04
name: 🚀 Update latest major git tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand All @@ -20,11 +20,13 @@ jobs:
git config --local user.email '[email protected]'
git config --local user.name "${{ github.actor }}"
git remote set-url origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/$REPO_PATH.git"
- name: Update major tag
env: {VERSION: "${{ steps.slug.outputs.version-major }}"}
run: |
git tag -fa "v$VERSION" -m "Update v$VERSION tag (using GitHub actions)"
git push --set-upstream origin "v$VERSION" --force
- name: Update minor tag
env: {VERSION: "${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}"}
run: |
Expand Down
55 changes: 19 additions & 36 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,60 +14,43 @@ concurrency:

jobs:
gitleaks:
name: Gitleaks
runs-on: ubuntu-20.04
name: 🔐 Check for GitLeaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 0}

- name: Check for GitLeaks
uses: gacts/gitleaks@v1 # Action page: <https://github.com/gacts/gitleaks>
- uses: gacts/gitleaks@v1

eslint:
name: Run eslint
runs-on: ubuntu-20.04
name: 🧪 Run ESLint
runs-on: ubuntu-latest
env: {FORCE_COLOR: 'true'}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with: {node-version: '16'}
- uses: gacts/setup-node-with-cache@v1
with: {node-version: 16}

- uses: actions/cache@v3
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-

- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --no-progress --non-interactive
- run: npm ci

- run: yarn lint
- run: npm run lint

dist-built:
name: Check distributive built state
runs-on: ubuntu-20.04
name: 🧪 Check distributive built state
runs-on: ubuntu-latest
outputs:
dist-changed: ${{ steps.state.outputs.changed }}
env: {FORCE_COLOR: 'true'}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with: {node-version: '16'}

- uses: actions/cache@v3
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- uses: gacts/setup-node-with-cache@v1
with: {node-version: 16}

- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --no-progress --non-interactive
- run: npm ci

- run: yarn build
- run: npm run build

- uses: actions/upload-artifact@v3
with: {name: dist, path: ./dist/, retention-days: 1}
Expand All @@ -76,10 +59,10 @@ jobs:
run: echo "changed=`git diff --diff-filter=ACMUXTR --name-only | grep dist/ > /dev/null && echo 'true' || echo 'false'`" >> $GITHUB_OUTPUT

commit-and-push-fresh-dist:
name: Commit and push fresh distributive
name: 🏗️ Commit and push fresh distributive
needs: [dist-built]
if: ${{ needs.dist-built.outputs.dist-changed == 'true' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
Expand All @@ -94,13 +77,13 @@ jobs:
commit_message: Automatic distributive rebuild

run-this-action: # non-existing files will not generate an error
name: Run action (${{ matrix.runs-on }}, version ${{ matrix.version }})
name: 🚀 Run action (${{ matrix.runs-on }}, version ${{ matrix.version }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
version: [1.3.0, 1.7.0, latest]
version: [1.3.0, 1.7.0, 4.0.0, 4.1.0, latest]
steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
# Environment files
*.env

# npm lock file (use yarn only)
package-lock.json
# yarn lock file (use npm only)
yarn.lock

# Logs
logs
*.log
yarn-debug.log*
yarn-error.log*

# Temp dirs & trash
/temp
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this package will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## v1.0.4

### Fixed

- The distributive URL for hurl versions `4.1.0` and above

### Changed

- Action dependencies were updated

## v1.0.3

### Changed
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " \033[32m%-18s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

install: ## Install all dependencies
docker-compose run $(DC_RUN_ARGS) node yarn install --no-progress --non-interactive
docker-compose run $(DC_RUN_ARGS) node npm install

shell: ## Start shell into a container with node
docker-compose run $(DC_RUN_ARGS) node sh

lint: ## Execute provided linters
docker-compose run $(DC_RUN_ARGS) node yarn lint
docker-compose run $(DC_RUN_ARGS) node npm run lint

build: ## Build frontend
docker-compose run $(DC_RUN_ARGS) node yarn build
docker-compose run $(DC_RUN_ARGS) node npm run build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Following inputs can be used as `step.with` keys:
New versions releasing scenario:

- Make required changes in the [changelog](CHANGELOG.md) file
- Build the action distribution (`make build` or `yarn build`)
- Build the action distribution (`make build` or `npm run build`)
- Commit and push changes (including `dist` directory changes - this is important) into the `master` branch
- Publish new release using repo releases page (git tag should follow `vX.Y.Z` format)

Expand Down
8 changes: 4 additions & 4 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 54fa5cc

Please sign in to comment.