Skip to content

Commit

Permalink
Merge branch 'main' into fix-submit-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom authored May 2, 2024
2 parents 875cf2e + f2ee85a commit fe0f8fe
Show file tree
Hide file tree
Showing 47 changed files with 1,500 additions and 336 deletions.
5 changes: 1 addition & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<!--
If you're having trouble, please open an issue in
http://github.com/exercism/exercism/issues.
Hello. Please do NOT open issues in this repository. Instead use the Exercism Community Forum: https://forum.exercism.org
If necessary, we will open actionable issues here
about what needs to change.
-->
10 changes: 5 additions & 5 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,16 @@
description: "Work on Documentation"
color: "ffffff"

# This label can be added to accept PRs as part of Hacktoberfest
- name: "hacktoberfest-accepted"
description: "Make this PR count for hacktoberfest"
color: "ff7518"

# This Exercism-wide label is added to all automatically created pull requests that help migrate/prepare a track for Exercism v3
- name: "v3-migration 🤖"
description: "Preparing for Exercism v3"
color: "e99695"

# This Exercism-wide label can be used to bulk-close issues in preparation for pausing community contributions
- name: "paused"
description: "Work paused until further notice"
color: "e4e669"

# ----------------------------------------------------------------------------------------- #
# These are the repository-specific labels that augment the Exercise-wide labels defined in #
# https://github.com/exercism/org-wide-files/blob/main/global-files/.github/labels.yml. #
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ["1.15"]
go-version:
- '1.20.x'
- '1.21.x'
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608

- uses: actions/setup-go@bfdd3570ce990073878bf10f6b2d79082de49492
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
with:
go-version: ${{ matrix.go-version }}

Expand All @@ -37,7 +39,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608

- name: Check formatting
run: ./.gha.gofmt.sh
22 changes: 22 additions & 0 deletions .github/workflows/pause-community-contributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Pause Community Contributions

on:
issues:
types:
- opened
pull_request_target:
types:
- opened

permissions:
issues: write
pull-requests: write

jobs:
pause:
if: github.repository_owner == 'exercism' # Stops this job from running on forks
uses: exercism/github-actions/.github/workflows/community-contributions.yml@main
with:
forum_category: support
secrets:
github_membership_token: ${{ secrets.COMMUNITY_CONTRIBUTIONS_WORKFLOW_TOKEN }}
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: release

on:
push:
tags:
- 'v*.*.*' # semver release tags
- 'v*.*.*-*' # pre-release tags for testing

permissions:
contents: write # needed by goreleaser/goreleaser-action for publishing release artifacts

jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:

- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20.x'

- name: Import GPG Key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@82a020f1f7f605c65dd2449b392a52c3fcfef7ef # v6.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}

- name: Cut Release
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
version: latest
args: release --clean --release-header .release/header.md --timeout 120m # default time is 30m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ _testmain.go
out/
release/
go-exercism
testercism

# Intellij
/.idea
Expand Down
170 changes: 105 additions & 65 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,112 @@
# You can find the GoReleaser documentation at http://goreleaser.com
project_name: exercism

env:
- CGO_ENABLED=0
builds:
- env:
- CGO_ENABLED=0
main: ./exercism/main.go
goos:
- darwin
- linux
- windows
- freebsd
- openbsd
goarch:
- amd64
- 386
- arm
- ppc64
goarm:
- 5
- 6
ignore:
- goos: openbsd
goarch: arm
- goos: freebsd
goarch: arm

checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
- id: release-build
main: ./exercism/main.go
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath # removes file system paths from compiled executable
ldflags:
- "-s -w" # strip debug symbols and DWARF debugging info
goos:
- darwin
- linux
- windows
- freebsd
- openbsd
goarch:
- amd64
- 386
- arm
- arm64
- ppc64
goarm:
- 5
- 6
ignore:
- goos: openbsd
goarch: arm
- goos: freebsd
goarch: arm
- id: installer-build
main: ./exercism/main.go
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath # removes file system paths from compiled executable
ldflags:
- "-s -w" # strip debug symbols and DWARF debugging info
goos:
- windows
goarch:
- amd64
- 386

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"

archives:
- name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
amd64: x86_64
386: i386
- id: release-archives
builds:
- release-build
name_template: >-
{{- .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{- .Arch }}{{ end }}
{{- if .Arm }}v{{- .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
- goos: windows
format: zip
files:
- shell/**/*
- shell/**
- LICENSE
- README.md
- id: installer-archives
builds:
- installer-build
name_template: >-
{{- .ProjectName }}-
{{- .Version }}-
{{- .Os }}-
{{- if eq .Arch "amd64" }}64bit
{{- else if eq .Arch "386" }}32bit
{{- else }}{{- .Arch }}{{ end }}
{{- if .Arm }}v{{- .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
files:
- shell/**
- LICENSE
- README.md

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"
ids:
- release-archives
- installer-archives

signs:
- artifacts: checksum
- artifacts: checksum
args:
[
"--batch",
"-u",
"{{ .Env.GPG_FINGERPRINT }}",
"--output",
"${signature}",
"--detach-sign",
"${artifact}",
]

release:
# Repo in which the release will be created.
Expand All @@ -72,33 +129,16 @@ release:
# Default is `{{.Tag}}`
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"

# brews:
# We do not use the brew config, which is for taps, not core forumulas.

snapcrafts:
-
name: exercism
license: MIT
# Whether to publish the snap to the snapcraft store.
# Remember you need to `snapcraft login` first.
# Defaults to false.
# publish: true
summary: Command-line client for https://exercism.org
# https://snapcraft.io/docs/reference/confinement
confinement: strict
# A snap of type base to be used as the execution environment for this snap.
base: core18
# https://snapcraft.io/docs/reference/channels
grade: stable
description: Exercism is an online platform designed to help you improve your coding skills through practice and mentorship. Exercism provides you with thousands of exercises spread across numerous language tracks. Each one is a fun and interesting challenge designed to teach you a little more about the features of a language.
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
replacements:
amd64: x86_64
386: i386
apps:
exercism:
plugs: ["home", "network", "removable-media","personal-files"]
plugs:
personal-files:
write:
- $HOME/
brews:
- name: exercism
repository:
owner: exercism
name: homebrew-core
commit_author:
name: Exercism Bot
email: [email protected]
folder: Formula
homepage: "https://exercism.org/"
description: "Command-line tool to interact with exercism.org"
test: |
system "exercism version"
3 changes: 3 additions & 0 deletions .release/header.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To install, follow the interactive installation instructions at https://exercism.io/cli-walkthrough

---
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ The exercism CLI follows [semantic versioning](http://semver.org/).
## Next Release
* **Your contribution here**

## v3.3.0 (2024-02-15)
* [#1128](https://github.com/exercism/cli/pull/1128) Fix `exercism test` command not working for the `8th` and `emacs-lisp` tracks - [@glennj]
* [#1125](https://github.com/exercism/cli/pull/1125) Simplify root command description
* [#1124](https://github.com/exercism/cli/pull/1124) Use correct domain for FAQ link [@tomasnorre]

## v3.2.0 (2023-07-28)
* [#1092](https://github.com/exercism/cli/pull/1092) Add `exercism test` command to run the unit tests for nearly any track (inspired by [universal-test-runner](https://github.com/xavdid/universal-test-runner)) - [@xavdid]
* [#1073](https://github.com/exercism/cli/pull/1073) Add `arm64` build for each OS

## v3.1.0 (2022-10-04)
* [#979](https://github.com/exercism/cli/pull/979) Protect existing solutions from being overwritten by 'download' - [@harugo]
* [#981](https://github.com/exercism/cli/pull/981) Check if authorisation header is set before attempting to extract token - [@harugo]
Expand Down Expand Up @@ -489,5 +498,6 @@ All changes by [@msgehard]
[@sfairchild]: https://github.com/sfairchild
[@simonjefford]: https://github.com/simonjefford
[@srt32]: https://github.com/srt32
[@xavdid]: https://github.com/xavdid
[@williandrade]: https://github.com/williandrade
[@zabawaba99]: https://github.com/zabawaba99
Loading

0 comments on commit fe0f8fe

Please sign in to comment.