Skip to content

Commit 491b763

Browse files
committed
remove automatic publish steps from CI and mix project
1 parent 0490a60 commit 491b763

File tree

3 files changed

+1
-107
lines changed

3 files changed

+1
-107
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -95,97 +95,3 @@ jobs:
9595
git add *.{html,json}
9696
git commit -m "publish Autobahn|Testsuite report" || true
9797
git push
98-
99-
publish-hex-package:
100-
name: Publish Hex Package ⬆️☁️
101-
runs-on: ubuntu-latest
102-
if: startsWith(github.ref, 'refs/tags/v')
103-
env:
104-
MIX_ENV: dev
105-
needs:
106-
- bless
107-
108-
steps:
109-
- name: Checkout
110-
uses: actions/checkout@v2
111-
112-
- name: Determine the elixir version
113-
run: echo "ELIXIR_VERSION=$(grep -h elixir .tool-versions | awk '{ print $2 }' | awk -F - '{print $1}')" >> $GITHUB_ENV
114-
115-
- name: Determine the otp version
116-
run: echo "OTP_VERSION=$(grep -h erlang .tool-versions | awk '{ print $2 }')" >> $GITHUB_ENV
117-
118-
- name: Setup Elixir and Erlang versions
119-
uses: erlef/[email protected]
120-
with:
121-
otp-version: ${{ env.OTP_VERSION }}
122-
elixir-version: ${{ env.ELIXIR_VERSION }}
123-
124-
- name: Restore the deps cache
125-
uses: actions/cache@v1
126-
id: deps-cache
127-
with:
128-
path: deps
129-
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-mixlockhash-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
130-
restore-keys: |
131-
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-deps-
132-
133-
- name: Restore the _build cache
134-
uses: actions/cache@v1
135-
id: build-cache
136-
with:
137-
path: _build
138-
key: ${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-build-mixlockhash-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
139-
restore-keys: |
140-
${{ runner.os }}-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ env.MIX_ENV }}-build-
141-
142-
- name: Fetch mix dependencies
143-
if: steps.deps-cache.outputs.cache-hit != 'true'
144-
run: |
145-
mix local.rebar --force
146-
mix local.hex --force
147-
mix deps.get
148-
149-
- name: Compile dependencies
150-
if: steps.deps-cache.outputs.cache-hit != 'true'
151-
run: mix deps.compile
152-
153-
- name: Generate documentation
154-
run: mix docs
155-
156-
- name: Determine the tag version
157-
env:
158-
GITHUB_REF: ${{ github.ref }}
159-
run: echo "TAG=$(echo "$GITHUB_REF" | awk -F / '{print $3}')" >> $GITHUB_ENV
160-
161-
- name: Write the tag version to .version
162-
run: echo $TAG > .version
163-
164-
- name: Determine the repository name
165-
run: echo "REPOSITORY=$(echo $GITHUB_REPOSITORY | awk -F / '{print $2}')" >> $GITHUB_ENV
166-
167-
- name: Create a GitHub Release
168-
id: create_release
169-
uses: NFIBrokerage/create-release@v2
170-
env:
171-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172-
with:
173-
tag_name: ${{ env.TAG }}
174-
release_name: Release ${{ env.TAG }}
175-
draft: false
176-
prerelease: false
177-
178-
- name: Publish library
179-
run: mix hex.publish --yes
180-
env:
181-
HEX_API_KEY: ${{ secrets.HEX_PUBLISH_KEY }}
182-
183-
- name: Notify ops channel of build success
184-
run: >
185-
curl
186-
-X POST
187-
-H 'Content-type:application/json'
188-
-d "{\"text\":\":hexpm: package published for $REPOSITORY $(git tag -ln $TAG)\"}"
189-
$SLACK_WEBHOOK
190-
env:
191-
SLACK_WEBHOOK: ${{ secrets.OPS_CHANNEL_SLACK_WEBHOOK }}

.version

Lines changed: 0 additions & 6 deletions
This file was deleted.

mix.exs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@ defmodule MintWebSocket.MixProject do
22
use Mix.Project
33

44
@source_url "https://github.com/elixir-mint/mint_web_socket"
5-
@version_file Path.join(__DIR__, ".version")
6-
@external_resource @version_file
7-
@version (case Regex.run(~r/^v([\d\.\w-]+)/, File.read!(@version_file), capture: :all_but_first) do
8-
[version] -> version
9-
nil -> "0.0.0"
10-
end)
115

126
def project do
137
[
148
app: :mint_web_socket,
15-
version: @version,
9+
version: "1.0.0",
1610
elixir: "~> 1.8",
1711
elixirc_paths: elixirc_paths(Mix.env()),
1812
erlc_paths: erlc_paths(Mix.env()),

0 commit comments

Comments
 (0)